All dogs are motivated by different things, the big trick is to find out what motivates your specific dog, and then practice about 17 million times. I've worked with a dog who was absolutely crazy for basketballs, so we incorporated a basketball into the play so the dog would always stay engaged. Another dog (puppy, really) would not stay onstage for the duration of the song that we needed him onstage for, so we added business where the actress fed the dog before singing - we mixed his kibble with peanut butter which slowed down how fast he could eat, so he stayed by his bowl the whole number. Find out what the dog absolutely loves, and incorporate that into the show.
For running across the stage from one wing to the other, whoever is catching the dog should be in the dog's sightlines and have either their favorite toy or treats the dog can see.
For running onstage and stopping, it is possible to "mark" train a dog, but it is time consuming and not practical if you don't have a dedicated trainer. Much simpler to have the dog run to a specific person.
With all the being said, no matter how much you practice, the first week of performances the dog will never do what it is supposed to do, because OMG there's people out there let me smell them!!!