You can easily automate shutting down your Windows system after a specific period using the Command Prompt.
Command for Automated Shutdown
To schedule a system shutdown, use the following command:
shutdown -s -t 1800
Explanation
-
-s
: Initiates the shutdown process. -
-t 1800
: Specifies the time delay before shutdown, in seconds. For this example, the system will shut down in 1800 seconds (30 minutes).
Canceling a Scheduled Shutdown If you need to cancel a scheduled shutdown, use:
shutdown -a
This will abort any pending shutdown operation.
Example Use Cases
-
Finish downloads or updates: Schedule a shutdown to ensure the system powers off after a long process.
-
Save energy: Automate shutdown for systems left running during non-productive hours.