?
Solved

vb script to schedule task for system reboot

Posted on 2008-10-07
1
Medium Priority
?
1,596 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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 …
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month8 days, 16 hours left to enroll

764 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