• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 387
  • Last Modified:

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?
0
mystikal1000
Asked:
mystikal1000
  • 4
  • 4
  • 2
  • +1
1 Solution
 
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
 
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
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
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
 
jkrCommented:
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
 
JamesDSCommented:
don't be such a lazy typist!!

:)
0
 
mystikal1000Author Commented:
MS does have a bug, it worked.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 4
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now