Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch files won't run using at command 2

Status
Not open for further replies.

jworley

Programmer
Jun 19, 2000
36
GB
Hi,

I have scheduled 3 jobs on on our NT4 SP6 box, the first runs ntbackup at 11:59pm each day, with exceptions being written to a backup.log text file. However, if the backup.log file is not cleared the following day (i.e. the contents of the file deleted, not the file itself), the backup fails.

This is why I've scheduled the next job to run a batch file called wipebackup.bat, all this does is to rename the backup.log and copy a clean version of it to the original filename.

The third job runs a batch file that just copies data from one folder to another (Development code etc.) so that our programmers have yesterday's source available to them if they make a cockup :)

The batch files all work fine if they are run in isolation (BTW they are all in the root of C:), but will not run when scheduled using at.

My syntax was:

at \\nt_server 13:00 /every:M,T,W,Th,F c:\wipebackup.bat

Any ideas ?

Jim Worley
jim@aits-uk.net
15 years practical IT experience from sales to support to development plus B.Sc. (Hons) Computer Studies, fluent German speaker, willing to have a go at anything and don't suffer fools gladly !
 
Jim,

NT's AT command can sometimes have problems with the /every command. The fix is to use
at \\nt_server 13:00 /every:M,T,W,Th,F cmd /c "c:\wipebackup.bat"

Darren Burnett

 
Good call... Bill
CNE, MCSE, CCNA, CCA, MCT, CCI

"I'd much rather be lucky than good"
 
I had have this problem and i solve it in adding /interactive in the at command.

Hope this help.

Farouk.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top