I'm just taking a shot in the dark here, but ....
have you considered writing a script to call the script in question twice? My thinking is - if you have to run the script twice - and a 'sleep' doesn't work - maybe if you run the script twice from another script (or even a batch script), it *may* work.
HTH