Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduled Batch Process 1

Status
Not open for further replies.

dljohnson19

IS-IT--Management
Feb 7, 2005
37
US
I have a simple batch file on a WIndows 2003 server that works fine running from the command line. I want to schedule this batch file to run once weekly on the scheduler. I can run it fine when I right-click and run it manually thru the scheduler. However, for some reason it never runs on the automated schedule. No errors in event view either. I have admin rights on the box and I am the one who the task should run as.....it just never does. Ideas???
 
Have you tried re-creating the task? All it takes is a small slip when entering user/pass on the runas box and you'll stop it running. Also have you entered the user as domain\user if that's who you are logged in as?
 
Does the batch file try to access any files that are on a mapped drive?

When you manually run the task, it runs in your user space. When it starts from the scheduler, it runs in a separate space but with the credentials you specify in the task. This means that it does not have the mapped drives. If you try to map the drives in the task, that may also fail if the drive letter is already in use in the user space. UNC references generally work better.

Also for errors, look at the Scheduler log (text file). While in the task schedule view in Windows Explorer, the log can be found under the Advanced menu.
 
Another thing to check is that you may need to specify to run the bat file from within a VM by first specifying to run CMD. For example CMD.EXE /C BatchName.bat

I hope you find this post helpful.

Regards,

Mark
 
Sorry, just got around to testing these ideas. I recreated the task and still had the problem. I was added to the admin group and still had the problem. I was not using any mapped drives, everything is on this local drive. BUT once I put the cmd /c in the front of the run line and tested it via changed scheduled time it worked like a charm. Thanks Mark!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top