Gabriela
2009-12-13 21:58:53 UTC
Hi
I have a vbs file that crawls some webpages on the web.
It takes the vbs ~10hours to complete the run, and works just fine.
I want it to run daily every 2 hours.
I setup a scheduled task, that run daily, every 2 hours, and receives
param1 as input:
"wscript.exe MyScript.vbs param1"
-> My script ran only ONCE a day. I presume that this is probably
because scheduled task cannot instantiate a new vbs instance, while
the task's script is still running. True?
If so, than I setup 12 scheduled tasks - starting at 00:00, 02:00,
04:00, ...22:00 - under the assumption that since it takes ~10hours to
run, next scheduled task will be without 24 hours, and won't collide.
Now the vbs scripts are instantiated correctly every 2 hours BUT - a
weird thing is happening - it seems like all scripts currently running
finish at the exact same second, and are fully synchronized. They are
all at the same line of code, even though they began 2 hours later.
It's like they're waiting for each other to be synced, and start
together, and finish together.
What's up with that?
Thanks,
Gabi.
I have a vbs file that crawls some webpages on the web.
It takes the vbs ~10hours to complete the run, and works just fine.
I want it to run daily every 2 hours.
I setup a scheduled task, that run daily, every 2 hours, and receives
param1 as input:
"wscript.exe MyScript.vbs param1"
-> My script ran only ONCE a day. I presume that this is probably
because scheduled task cannot instantiate a new vbs instance, while
the task's script is still running. True?
If so, than I setup 12 scheduled tasks - starting at 00:00, 02:00,
04:00, ...22:00 - under the assumption that since it takes ~10hours to
run, next scheduled task will be without 24 hours, and won't collide.
Now the vbs scripts are instantiated correctly every 2 hours BUT - a
weird thing is happening - it seems like all scripts currently running
finish at the exact same second, and are fully synchronized. They are
all at the same line of code, even though they began 2 hours later.
It's like they're waiting for each other to be synced, and start
together, and finish together.
What's up with that?
Thanks,
Gabi.