Batch file won't run unless I'm logged on

G

Guest

I have a simple batch file (using RoboCopy) that runs fine...if I'm logged on
only! I have it as a scheduled task, scheduled to repeat every day, but if
I'm logged off the box...it won't ever run and displays a "0x10" result
within scheduled task manager.

The box is: XP-Pro/SP2 with all updates.

Suggestions??? I'm stumped.

Thank you.
 
P

Pegasus \(MVP\)

Ed Flecko said:
I have a simple batch file (using RoboCopy) that runs fine...if I'm logged on
only! I have it as a scheduled task, scheduled to repeat every day, but if
I'm logged off the box...it won't ever run and displays a "0x10" result
within scheduled task manager.

The box is: XP-Pro/SP2 with all updates.

Suggestions??? I'm stumped.

Thank you.

It is highly likely that the batch file ***does*** run but
that it does not do what it should because you overlooked
a few things. Modify your batch file as follows, then have
a look at c:\test.log and all will become clear.

@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
robocopy /. /. /. etc. 1>>c:\test.log 2>>&1
echo ErrorLevel of robocopy=%ErrorLevel% >> c:\test.log
echo %date% %time% End of task >> c:\test.log

If you still have a problem, show us your batch file!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top