Solved

vb script to schedule task for system reboot

Posted on 2008-10-07
1
1,585 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
ID: 22660882
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

820 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