AT Error

  • Thread starter Thread starter HM2K
  • Start date Start date
H

HM2K

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\Documents and Settings\Administrator>at
Status ID Day Time Command Line
-------------------------------------------------------------------------------
1 Each M 11:00 PM "C:\dailybackup.bat
monday"
2 Each T 11:00 PM "C:\dailybackup.bat
tuesday"
3 Each W 11:00 PM "C:\dailybackup.bat
wednesday"

Error 4 Each Th 11:00 PM "C:\dailybackup.bat
thusday"
5 Each F 11:00 PM "C:\dailybackup.bat
friday"

C:\Documents and Settings\Administrator>C:\dailybackup.bat thusday

-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows :: Version
XP026
-------------------------------------------------------------------------------

Started : Thu Oct 22 09:34:29 2009


....

Event Type: Error
Event Source: Schedule
Event Category: None
Event ID: 7901
Date: 22/10/2009
Time: 09:32:38 AM
User: N/A
Computer: SERVER
Description:
The At4.job command failed to start due to the following error:
The system cannot find the file specified.
 
I fixed it by doing the following:

@echo off
echo Removing first 5 AT entiries...
at 1 /delete
at 2 /delete
at 3 /delete
at 4 /delete
at 5 /delete
echo Adding daily backup entries...
REM Notice that the quotes have been removed from the command...
AT 23:00 /interactive /every:M C:\dailybackup.bat monday
AT 23:00 /interactive /every:T C:\dailybackup.bat tuesday
AT 23:00 /interactive /every:W C:\dailybackup.bat wednesday
AT 23:00 /interactive /every:Th C:\dailybackup.bat thusday
AT 23:00 /interactive /every:F C:\dailybackup.bat friday
echo done!
 
Back
Top