0

I have multiple scheduled tasks set up on Windows 2008 Server. They are all running the same executable with different arguments (pointing to different config files). They (mostly) all have different start times. They have been running without issues for a couple years. About 3 weeks ago they began starting at their scheduled times and then ending 1 second later. The weird thing is that they are scheduled to run Mon thru Friday and are only exhibiting this behavior on Wednesday, Thursday and Friday. They run fine on Monday and Tuesday.

Also, it is not the same tasks failing each day. Some are starting and failing one day, and the next day they will start successfully. I should point out that the task is not failing with an error. It is starting on time and then completing during the same second (see screen shot of task history).

I have checked for any server updates that would have affected the task scheduler functionality, but none were applied. There were no code changes to the executable that would have caused the issue. I've also tried running these tasks using a different scheduler called Visual Cron. The same behavior occurred.

So it doesn't seem to a scheduler issue, but I'm out of ideas for what could be causing this issue. Anyone ever dealt with something similar? task history

fixer1234
  • 28,064

1 Answers1

1

My issue has been resolved. We were running Commvault on the server to backup and archive files. Commvault can leave stubs of files that can be used to recall the file after archiving it. It turns out that the log file that my scheduled tasks were trying to generate had the exact same name as the stubs for logfiles that already existed. So the schedule task started, tried to generate the log file, saw that it already existed (even though it was just a stub) and then ended. Restarting the task worked because the log file that it generated used a timestamp in the name and generated a differently name log file that did not exist. The reason the jobs ran fine on Monday and Tuesday was because the stubs for the logfiles were from one year ago. The dates for Monday and Tuesday this year fell on a Saturday and Sunday last year, when the jobs are not scheduled to run.