Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

vb script to schedule task for system reboot

Posted on 2008-10-07
1
Medium Priority
?
1,597 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
[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
1 Comment
 
LVL 38

Accepted Solution

by:
Shift-3 earned 2000 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

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 script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

604 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