Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 385
  • 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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