How to Schedule Tasks from Command Line Windows 10/11
Learn how to automate daily reboots or shutdowns at specific times using the command line or command prompt in Windows 10/11.
Below is an example of scheduling a computer shutdown daily at 6 PM:
schtasks /create /sc daily /tn ShutdownAt6PM /tr "shutdown -s -f -t 2" /st 18:00 /NP
schtasks: Command used to schedule tasks. The deprecated AT command from earlier Windows versions is no longer supported.
/create: Creates a new task.
/sc: Sets the frequency of the task, such as once or daily.
/tn: Specifies the name of the task, serving as its description.
/tr: Defines the command to execute, like “shutdown -s -f -t 2“. Here, -s initiates shutdown, -f forces shutdown, and -t 2 introduces a 2-second delay. Replace -s with -r to reboot instead of shutting down.
/st: Indicates the time to execute the command.
/NP: Ensures the scheduled task runs on Windows computers irrespective of user logins.
By using this command, you can streamline and automate regular shutdowns or reboots for enhanced system management.

Leave a Reply
Want to join the discussion?Feel free to contribute!