We have a script running the Add Scheduled Task action to restart itself 2 minutes after it finishes. The stars aligned last night and we bumped into an issue when the script exited within 2 minutes of midnight and attempted to create a scheduled task that was slated for the next day. Here's the log (our company info replaced by items in brackets):
Parameters: /Create /TN "[script name]" /RU [user] /RP [password] /SC ONCE /TR "\"C:\Program Files\FinalBuilder 6\\FinalBuilder6.exe\" /r /n /e [file path]" /ST 00:01:15 /SD 1/20/2010
Output from C:\WINDOWS\system32\schtasks.exe
ERROR: Invalid Start Date (Date should be in "mm/dd/yyyy" format).
Type "SCHTASKS /CREATE /?" for usage. Action Failed
C:\WINDOWS\system32\schtasks.exe returned : 1
It looks like there may be a bug when FinalBuilder needs to provide an /SD for the next day to satisfy the task. The format for the month doesn't appear to be a two digit month, which schtasks.exe seems to expect. Normally for us the /SD parameter isn't provided during this action, because in most reschedules, they are slated to start on the same day.
We're currently running 6.3.0.1472, but just from a surface perusal, it looked like there had been no changes in this action. We could always call schtasks.exe with our own calculated parameters, but it's such a convenient action, that if there is a bug here, it would be handy if the action could perhaps be updated.
Thanks