For the life of me, I can't seem to get a batch file running in Server 2008 Task Scheduler, despite it not having the common problems I've seen before.

Problem so far:

  • I have a batch file that takes a hotcopy backup of some repositories and ZIPs them. I am able to run this manually.
  • I have created a task in the task scheduler to call the batch file (no quotes, no command-line args).
  • No matter what, the task returns with Code 0x1 (which I believe has something to do with permissions).

Troubleshooting steps so far:

  • Ran the task manually. Runs perfectly.
  • Made sure I didn't have quotes in arguments due to the 2008 Server hotfix bug outlined previously on ServerFault. I have not only no quoted arguments, but no arguments.
  • Redirected output to a log file to see if it was running. It isn't.
  • Changed the user from the System Service account to the local Administrator account for testing purposes. The Administrator account has all necessary rights & privileges, and is currently logged on when trying to run the task manually.
  • Created another batch file which does nothing but call the other batch file to see if it was somehow maybe a command in the batch file that is initially called. This still fails, but again works if run manually.

I'm at a dead end. Any new thought that could jump-start the troubleshooting process? Thanks!

Edit 1: To clarify, I should note that I'm checking "run task whether user is logged on or not", but I do not remember if it was set up that way initially.

link|improve this question

50% accept rate
Do you have the check mark for only run if user is logged in? I did that once :( – Nixphoe Aug 3 '11 at 19:21
@Nixpoe: good point. Maybe he should try to recreate the Task from scratch. – jftuga Aug 3 '11 at 19:30
@goober: what do the event logs say? – jftuga Aug 3 '11 at 19:31
@Nixope, I've clarified the question; I have "run whether user is logged on or not" checked, as this is the behavior I wish to achieve. – goober Aug 3 '11 at 19:48
@jftuga, I cannot seem to find any associated events in the Event Log after looking through. Is there a specific section you can point to? – goober Aug 3 '11 at 19:48
show 1 more comment
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.