task scheduler problem

  • Thread starter Thread starter Arch Stanton
  • Start date Start date
A

Arch Stanton

I have been trying for a while to get a batch file to run around 3 in
the morning. During the day, I have tested it by locking my computer
and putting it in sleep mode. It wakes up and runs the batch file
perfectly. But when I leave it to run overnight it fails every time.
When I get here in the morning I have a red 'X' on the network drive
that the batch file is sitting on. All I have to do is click on the
drive and it refreshes fine. But when I go to manually run the batch
file it says it can't start it. If I open the task, re-input my
network password and then run it, it works. Do you have any idea why
the saved password would disappear or why the drive mapping would crap
out overnight?
 
Be sure your account has network access rights for 24 hours a day. It is
likly your account is being disabled after hours.
 
Add some basic diagnostic to your batch file:

@echo off
echo %date% %time% Start of job > c:\test.log
c:\SomeFolder\SomeProgram.exe 1>>c:\test.log 2>>c:\test.err
echo %date% %time% End of job >> c:\test.log

Now examine the log files, and all will become clear.
 
Back
Top