Solved

Scheduled tasks

Posted on 2004-03-24
11
374 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
  • 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

759 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now