Scheduled tasks

G

Gabriele O.

Hi all,
Is there a known bug about scheduled tasks? I set up a task to perform
every week a simple batch (.bat) program (whose task is to move and
delete a few files), and it won't work. Note that if I run manually
the batch file, it will run with no problem at all. Thus, the problem
must be the windows' scheduled task manager. Is there any way I can
make it work?

Thank you in advance.
 
W

William W. Plummer

Gabriele O. said:
Hi all,
Is there a known bug about scheduled tasks? I set up a task to perform
every week a simple batch (.bat) program (whose task is to move and
delete a few files), and it won't work. Note that if I run manually
the batch file, it will run with no problem at all. Thus, the problem
must be the windows' scheduled task manager. Is there any way I can
make it work?
It might be a protection problem. You have the access to delete the files
but when it is run as a scheduled task, it runs as a different user or with
different protection. When you create the task there is a "run as ..." box
that you should use.
 
P

Pegasus \(MVP\)

Gabriele O. said:
Hi all,
Is there a known bug about scheduled tasks? I set up a task to perform
every week a simple batch (.bat) program (whose task is to move and
delete a few files), and it won't work. Note that if I run manually
the batch file, it will run with no problem at all. Thus, the problem
must be the windows' scheduled task manager. Is there any way I can
make it work?

Thank you in advance.

Have you considered the possibility that the problem may
lie with your batch file and not with the Task Scheduler?
If you make your batch file a little less simple, by including
some diagnostics, then you will most likely find that the
Task Scheduler works exactly as it should. Try this:

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

Now have a look at the two log files and all will become clear.
 

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