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

4
  • So run the EXE from command line, etc. from the same server and from the same security context as the Task Scheduler scheduled task does. Look here for some clues as well although it sounds like whatever the process does logic wise is within the EXE but the same general rules would still apply: superuser.com/questions/1005192/…... Like a security issue, a working directory issue (maybe due to DLL, etc. being needed), a security context issue once the logic runs as this answer talks about, etc. Commented Sep 28, 2016 at 21:08
  • People are more likely to read your question if you format it so it is not a wall of text. Please read Markdown help and edit your question to add paragraphs and bullet points ...
    – DavidPostill
    Commented Sep 29, 2016 at 11:13
  • Yes, the jobs run fine from a command prompt and always work when manually ran from the task scheduler after the initial scheduled run/completion.
    – windwill
    Commented Sep 30, 2016 at 14:12
  • You could probably put some logging functions in the script. That way you know how far the script gets before it fails. It's possible that you script is being executing but just failing an instruction. Commented Sep 30, 2016 at 15:04

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .