1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Scheduling a System Reboot in W2003 Server

Discussion in 'Windows Server System' started by Dez Bradley, 2005/03/22.

Thread Status:
Not open for further replies.
  1. 2005/03/22
    Dez Bradley

    Dez Bradley Inactive Thread Starter

    Joined:
    2004/10/11
    Messages:
    246
    Likes Received:
    0
    Hi there

    Any Windows 2003 Server gurus able to tell me how to schedule an automatic system reboot each day at a cetain time. (Maybe using built in Windows Scheduler?)

    I want to do this to log off terminal server users who forgot to log off (nobody needs to be logged on at the time of the night this happens) and to release files and processes, right before the scheduled tape backup takes place, so it has no trouble copying files. Probably wouldnt hurt the Server to be restarted each day at a time it wont affect users anyway.

    I have a script i use to stop the SQL database service that runs thier database in a program they use, and this is needed so i can backup the database (it wont copy when active). If i run this script to release the DB when a user is logged on, thier session crashes and possible data corruption can occur. This script is already in the scheduler. I want to reboot the PC to log everyone off before the script runs, which is just before the backup.

    Of course being able to schedule a full user logoff in W2003 Server would also do the job for me, as i said, it wouldnt be a bad thing to reboot the Server daily.

    Thanks in advance!
    :)
     
  2. 2005/03/22
    chicagotech

    chicagotech Inactive

    Joined:
    2005/02/28
    Messages:
    17
    Likes Received:
    0
    first, you may want to setup an idle time. this step by step how to schedule to retart a server may help, quoted from http://www.howtonetworking.com

    How to schedule to restart a Windows server
    in a case you want to restart a windows server at a certain time, you can use shutdown command plus Scheduled Tasks. Here are step by step:
    1. Create a batch file called downtime.bat using notepad.
    2. Add this line in the batch: shutdown -r -f -t 30 (note: -r = Shutdown and restart the computer, -f = Forces running applications to close without warning, -t 30 = Set timeout for shutdown to 30 seconds) and save the downtime.bat at C drive.
    3. Open Scheduled Tasks by going to Start>All Programs>Accessories>System Tools.
    4. Click Add Scheduled Tasks.
    5. Browse the downtime.bat from C drive.
    6. Follow the screen to setup the day and time.
    7. Assign a user who has administrator rights and finish the settings.
    Note: the shutdown options may different deepening on eth version of the shutdown command.

    Related Topics
    Shutdown options
    Scheduled Tasks
     

  3. to hide this advert.

  4. 2005/03/22
    Dez Bradley

    Dez Bradley Inactive Thread Starter

    Joined:
    2004/10/11
    Messages:
    246
    Likes Received:
    0
    Thanks for your help Chicagotech, much appreciated. i knew thier had to be a way to do it from command line, hence being able to make a batch file to run in scheduler. I already have 1 batch file running in the scheduler that releases the database so the backup can back it up, so this will be easy.

    I will try it later today, when less users are on the system, and if i dont write back to this thread it worked and i am very happy camper!

    Thanks Again! :)
     
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.