Server Reboot

Roger Roger 6,671 Reputation points
2021-06-16T16:58:59.847+00:00

Hi All

i want to reboot one of my server daily at 5PM, the server should be rebooted even if any user is logged in or not. will the below task scheduler work for me. how do i specify if any user is logged in or not.

task schduler i have created a folder by name ServerReboot
Create Basic Task
Trigger Daily--Start 5PM Recur every 1 day
Action: start the program
Program/Script: shutdown -r Add Arguments: -t 60 (after 60 seconds it can reboot)

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,852 questions
Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,549 questions
Windows Server 2012
Windows Server 2012
A Microsoft server operating system that supports enterprise-level management, data storage, applications, and communications.
1,611 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,490 questions
Windows Server Management
Windows Server Management
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Management: The act or process of organizing, handling, directing or controlling something.
445 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Laude 85,851 Reputation points
    2021-06-16T17:06:54.587+00:00

    Hi @Roger Roger ,

    The server will reboot even if a user is logged in, the scheduled task action should look as follows:

    106275-shutdown-r.png

    ----------

    If the reply was helpful please don't forget to upvote and/or accept as answer, thank you!

    Best regards,
    Leon

    3 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Teemo Tang 11,436 Reputation points
    2021-06-17T01:35:17.893+00:00

    Yes, the task will run either you are logged in or not, I think your task scheduler steps are correct:

    Detailed steps below:

    1. Run "Taskschd.msc" at the command prompt to open the Task Schedule.
    2. Click the Action menu, and then click Create Basic Task.
    3. Type a name for the task and an optional description, and then click Next.
    4. To select a schedule based on the calendar, click Daily then click Next; specify the schedule you want to use, and then click Next.
    5. To schedule a program to start automatically, click Start a program, and then click Next.
    6. Enter "at 17:00 shutdown -r -t 60" in the box and then click Next and finish.

    -------------------------------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    3 people found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.