I have nightly tasks scheduled on a Windows Server 2008 R2 machine. The first one kicks off at 5:00 and produces a file. The second one runs at 5:05 and emails me the contents of that file.
This morning for the first time ever, I received an email containing only yesterday's date. That is usually the first line of text, followed by much more.
The reason is the 5:00 program wasn't done (it took 10 minutes instead of the usual one minute or less). So the 5:05 program ran and didn't have the input file completely available.
Is there a way to string together your actions in the task scheduler so that a second program will run when the first program is finished? It seems there are ways to wait for an event to occur, but I don't know how to make the first program produce an event that would get logged and thereby initate the second program. Right now they are scheduled as individual tasks based on clock time. Though it's been fine up to now, I hate having to guess how much time the first program will need.
The first program is written in VB6 and the second program is written in VBScript.
Thanks.




Reply With Quote