Scheduled tasks

What is the AT command to run a batch file at 4:00AM M-F every week?  Also I need to know how to create a batch file to automatically close all apps and restart the computer?
LVL 1
mystikal1000Asked:
Who is Participating?
 
jkrConnect With a Mentor Commented:
Hum, re-read the article - it says

use the following abbreviations: M,T,W,Th,F,S,Su

So, MS apparently has a bug in their own KB :o)

Does

at \\TEST1 04:00 /every:M,T,W,Th,F c:\shutdown.bat

work?
0
 
jkrCommented:
See http://support.microsoft.com/default.aspx?scid=kb;en-us;313565 ("HOW TO: Use the AT Command to Schedule Tasks")

You'd use

at 4:00 /every:M,T,W,Thu,F mybatch.bat
0
 
mystikal1000Author Commented:
The command doesn't work

at 4:00 /every:M,T,W,Thu,F c:\shutdown.bat

it says "you used an option with an invalid value"
0
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 
jkrCommented:
Ooops, did you check the article? Try

at 04:00 /every:M,T,W,Thu,F c:\shutdown.bat

It has to be 04:00, not 4:00, sorry.
0
 
mystikal1000Author Commented:
I tried the command, but I still receive the same message...

at \\TEST1 04:00 /every:M,T,W,Thu,F c:\shutdown.bat
0
 
mikeleebrlaCommented:
will your shutdown.bat batch file work at all,, maybe its the batch file that is causing the error,, not the at/schedule part.
0
 
jkrCommented:
Would be an option, too. BTW, is the batch file accessible by 'LocalSystem'?
0
 
mystikal1000Author Commented:
It isn't the batch file.  I even added the batch file to the local system permission, but I still receive "you used an option with an invalid value".  Anything else?
0
 
JamesDSCommented:
err, guys

this works, I just tested it:

at \\test 04:00 /every:Monday,Tuesday,Wednesday,Thursday,Friday "c:\shutdown.bat"

Enjoy!

Cheers

JamesDS
0
 
JamesDSCommented:
don't be such a lazy typist!!

:)
0
 
mystikal1000Author Commented:
MS does have a bug, it worked.
0
All Courses

From novice to tech pro — start learning today.