Solved

vb script to schedule task for system reboot

Posted on 2008-10-07
1
1,587 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 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk) The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

739 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