Solved

vb script to schedule task for system reboot

Posted on 2008-10-07
1
1,581 Views
Last Modified: 2008-10-09
is there away to get vbscript to create a scheduled task?  the scheduled task needs to reboot the PC at a certain time. I could use and example.
0
Comment
Question by:Pioneermfg
1 Comment
 
LVL 38

Accepted Solution

by:
Shift-3 earned 500 total points
Comment Utility
See this article for examples and a discussion of some of the problems with using vbscript to create scheduled tasks:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept04/hey0922.mspx

It's usually easier to use the SCHTASKS command in a batch script, e.g.
schtasks /create /RU "NT AUTHORITY\SYSTEM" /SC DAILY /TN Reboot /TR "shutdown -r -f -t 600" /st 22:00:00

See this page for syntax:
http://www.ss64.com/nt/schtasks.html

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Recently I finished a vbscript that I thought I'd share.  It uses a text file with a list of server names to loop through and get various status reports, then writes them all into an Excel file.  Originally it was put together for our Altiris server…
This is an addendum to the following article: Acitve Directory based Outlook Signature (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24950055.html) The script is fine, and works in normal client-server domains…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

10 Experts available now in Live!

Get 1:1 Help Now