How about having your script look for your empeg every 30 secconds untill it finds it, and then upload the routes and exit?

Matthew