Solved

automatically server restart

Posted on 2014-02-24
4
416 Views
Last Modified: 2014-02-25
I have windows 2008 with mssql 2008.
I would like to server restart every sunday at 03:00 automatically.

can some one show me with ste guiede how can i do that?
0
Comment
Question by:apollo-13
[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
  • 2
  • 2
4 Comments
 
LVL 29

Accepted Solution

by:
becraig earned 500 total points
ID: 39884881
Open the Scheduled Task 
START ->All Programs ->Accessorier -> System Tools -> Scheduled Tasks

2Create a new task

Double Click on the "Add a New Scheduled Task"

3Follow the Scheduled Task Wizard

Click "Next"

4Select the program to run

Click on Browse to select the proper program and location to run. Navigate to "C:\WINDOWS\System32\shutdown.exe"

5Select the Frequency

This is where you set how often you want to "task" to exicute. So if you wanted your server to reboot weekly you select "weekly"

6Select the time and day you want the task to start.

This can be once a week at 3 AM or every Wednesady and Friday nights.

7Enter the username and password for a user

This is the user that the scheduled task will run as. I suggest using an account that has domain admin privileges.

8You have successfuly scheduled the following task

At this point you would be done, if you wanted the server to shutdown at the scheduled time. We are going to select the Open Advanced options when I click finished. Then click Finish

9Advanced Options

In the Run option you will see the location of the shutdown program. we are going to add some options.

-r This wil have ther server shutdown and then restart 
-f This will force the server to force any running application to close 
-t 01 This is a time-out before shutdown.

so the full run command is: 
C:\WINDOWS\system32\shutdown.exe -r -f -t 01

Select Apply




I would be careful about any jobs etc that might be running around the time I set for reboot.  
Use /f /r with the shutdown command for force and reboot
0
 

Author Comment

by:apollo-13
ID: 39884889
i would like only server RESTART at 03:00am every sundays
0
 

Author Comment

by:apollo-13
ID: 39884892
how can i do .cmd datei for restart run
0
 
LVL 29

Expert Comment

by:becraig
ID: 39884899
schtasks /Create /TN Shutdown /SC WEEKLY /MO /D SUN /ST 03:00 /TR "shutdown -r -f"

That would schedule it


A simple cmd you could call would be
Shutdown /r /f

You could then call that cmd file
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
Suggested Courses

622 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