tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

PAUSE command moral

14 Dec 2010 Batch files, Windows

Few days ago I created batch file to backup Firebird databases, Subversion repositories and some other data on a new server. During the testing of the script I put PAUSE command at the end, to see the result (or better to say errors). After I was done with polishing it up I created record in Task Scheduler and started test run. Everything finished in a couple of minutes nicely. I left it there, expecting it to do the backup during the night, as scheduled.

Next day I checked the result and the task failed with 0x8004131F aka SCHED_E_ALREADY_RUNNING. I checked CPU and disk utilization and it was clear the backup is not running. Kind of confused I ran backup manually and waited another day. And guess what, same error. As you probably now see, the problem was the PAUSE command at the end of the script. So the task was actually running, and waiting for the input. Clearly visible in Process Explorer.

I removed it and now everything works fine. Such a stupid mistake caused such a confusion. :)