Scheduled Task

M

Mac

I have installed one pc with 40gb of hard drive on my network so I can take
automatic backup of my server every night.

I created a batch file which copies certain folders to my pc then I schedule
a job thru scheduled taks in conrol panel to run every night. Now the
problem is, sometimes it runs only once, sometimes it never runs and today I
was checking scheduled task and status says running. I ran manually and it
took only an hour. Finally I had to end the task.

I have double checked and it is scheduled to run everyday at 9:00pm.

Any suggestion ?
 
Z

zekolas

Mac said:
I have installed one pc with 40gb of hard drive on my network so I can take
automatic backup of my server every night.

I created a batch file which copies certain folders to my pc then I schedule
a job thru scheduled taks in conrol panel to run every night. Now the
problem is, sometimes it runs only once, sometimes it never runs and today I
was checking scheduled task and status says running. I ran manually and it
took only an hour. Finally I had to end the task.

I have double checked and it is scheduled to run everyday at 9:00pm.

Any suggestion ?

what do the log files say, check the logs in the event viewer to check
for any problems, or change the command in the scheduled tasks to run
"c:\backup.bat >> log.txt" that way it should make a that log file that
may conntain errors.
 
G

Guest

Mac, I'm not sure I completely understood what you mean. I'm going to guess
that your scheduled task probably runs every day as scheduled, but sometimes
the batch job initiated by the scheduled task fails to complete the copy
process. (If the scheduled task itself doesn't run, you should check the
task schedule to make sure it is set up correctly). This could be because
one or more files in the selected folders to be copied are enqued for
exclusive use. Depending on other processes running on your server, you
might try changing the task to run later in the evening when the files might
not be in use. Curt
 
J

John Holmes

Mac blabbered in alt.os.windows-xp:
I have installed one pc with 40gb of hard drive on my network so I
can take automatic backup of my server every night.

I created a batch file which copies certain folders to my pc then I
schedule a job thru scheduled taks in conrol panel to run every
night. Now the problem is, sometimes it runs only once, sometimes it
never runs and today I was checking scheduled task and status says
running. I ran manually and it took only an hour. Finally I had to
end the task.

I have double checked and it is scheduled to run everyday at 9:00pm.

Any suggestion ?

Take a look at syncback (www.syncback.com) There's a fully functional
free version available for download.
 
P

Pegasus \(MVP\)

Mac said:
I have installed one pc with 40gb of hard drive on my network so I can take
automatic backup of my server every night.

I created a batch file which copies certain folders to my pc then I schedule
a job thru scheduled taks in conrol panel to run every night. Now the
problem is, sometimes it runs only once, sometimes it never runs and today I
was checking scheduled task and status says running. I ran manually and it
took only an hour. Finally I had to end the task.

I have double checked and it is scheduled to run everyday at 9:00pm.

Any suggestion ?

Instead of launching your backup directly from the Task Scheduler,
embed it in a batch file like so:

@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
xcopy.exe /s /d /y /c "c:\...." "d:\..." 1>>c:\test.log 2>c:\test.err
echo ErrorLevel of c:\Tools\YourTask.exe=%ErrorLevel% >> c:\test.log
echo %date% %time% End of task >> c:\test.log

Now schedule the batch file, then examine the two log files.
You will probably find the answer there!
 

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