Solved

Scheduled tasks

Posted on 2004-03-24
11
378 Views
Last Modified: 2010-04-13
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
Comment
Question by:mystikal1000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 10668731
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
 
LVL 1

Author Comment

by:mystikal1000
ID: 10669269
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
 
LVL 86

Expert Comment

by:jkr
ID: 10669444
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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 1

Author Comment

by:mystikal1000
ID: 10669630
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
 
LVL 25

Expert Comment

by:mikeleebrla
ID: 10669986
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
 
LVL 86

Expert Comment

by:jkr
ID: 10670007
Would be an option, too. BTW, is the batch file accessible by 'LocalSystem'?
0
 
LVL 1

Author Comment

by:mystikal1000
ID: 10670534
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
 
LVL 16

Expert Comment

by:JamesDS
ID: 10670581
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
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 10670590
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
 
LVL 16

Expert Comment

by:JamesDS
ID: 10670599
don't be such a lazy typist!!

:)
0
 
LVL 1

Author Comment

by:mystikal1000
ID: 10670703
MS does have a bug, it worked.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Invest in your employees with these five simple steps to improve employee engagement and retention.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question