Mastering Wake on Lid Closure in Windows Devices

Mastering Wake on Lid Closure in Windows Devices

Joseph Lv12

Mastering Wake on Lid Closure in Windows Devices

Key Takeaways

  • Schedule a shutdown in Windows 11 and 10 using Task Scheduler for daily, weekly, or monthly tasks. Customize the start date and time.
  • Add a trigger condition to your shutdown task to run it after a specified period of inactivity using Task Scheduler.
  • Use Command Prompt to schedule a system shutdown with a specific timer or define a shutdown time. Customize with shutdown parameters.

By default, Windows is configured to put your computer to sleep after a few minutes of inactivity. But if you prefer to shut down your computer every day or when idle for a long time, you can use the Task Scheduler to schedule an automatic system shutdown instead.

Here we show you how to schedule a shutdown in Windows 11 and 10 computers.

How to Schedule a Windows 11 Shutdown Using Task Scheduler

Task Scheduler is a job scheduling utility available on the Windows operating system. You can use Task Scheduler to run programs automatically on Windows .

You can also use it to create a scheduled task to shut down your PC daily at a specified time. Scheduling a task via Task Scheduler is preferred if you need to repeat a task daily, weekly, or once a month.

To create a shutdown task:

  1. Press the Win key to open the Windows search bar.

  2. Type Task scheduler and click on the app from the search result to open it.

  3. In the Task Scheduler window, click on Action and select Create Basic Task.
    create basic task

  4. In the Basic Task window, type a name for the task. For example, type Shutdown as the name. You can also provide a description of the task.
    task name task scheduler

  5. Click Next.
    daily trigger set date time

  6. Next, select a trigger point. You can choose from Daily, Weekly, Monthly, One Time, etc. For this guide, we will select the Daily trigger to schedule a daily shut down at a specific time.

  7. So, select Daily and click Next.

  8. Next, set the Start date and time for the recurring shut down and click Next.

    start a program task action

  9. In the Action tab, select Start a program and click Next.
    start a program task command

  10. Type shutdown.exe in the Program/Script field and click Next.

  11. Review the changes and click Finish to create and add the new task to your Windows schedule.

That’s it. The Task Scheduler will trigger the shutdown action daily at your specified time and power off your PC.

How to Automatically Shut Down Windows on Idle via Task Scheduler

If you want, you can add a trigger condition to your shutdown task to determine when the task should run. This is helpful if you want to run the shutdown task after a specified period of inactivity.

For this guide, we will modify the shutdown task created earlier. If you want, you can create a new task as well.

  1. Select your existing shutdown task in the Task Scheduler.
  2. Right-click on the task and select Properties.
    active task properties task scheduler
  3. Open the Conditions tab in the Properties window.
    start the task only if the computer is idle for the option
  4. Select Start the task only if the computer is idle for the option.
  5. In both the time fields, enter the same time. For example, if you enter 10 minutes, the Task Scheduler will wait for the system to be idle for 10 minutes before triggering the Shut down task. You can choose anywhere from a few minutes to two hours.
  6. Click OK to save the changes.

How to Stop an Automatic Shutdown via Task Scheduler


VSDC Pro Video Editor is a light professional non-linear video editing suite for creating a movie of any complexity. It supports the most popular video/audio formats and codecs, including 4K, HD and GoPro videos. Preconfigured profiles make the creation of videos for various multimedia and mobile devices absolutely hassle-free.

Key features:

• Import from any devices and cams, including GoPro and drones. All formats supported. Сurrently the only free video editor that allows users to export in a new H265/HEVC codec, something essential for those working with 4K and HD.
• Everything for hassle-free basic editing: cut, crop and merge files, add titles and favorite music
• Visual effects, advanced color correction and trendy Instagram-like filters
• All multimedia processing done from one app: video editing capabilities reinforced by a video converter, a screen capture, a video capture, a disc burner and a YouTube uploader
• Non-linear editing: edit several files with simultaneously
• Easy export to social networks: special profiles for YouTube, Facebook, Vimeo, Twitter and Instagram
• High quality export – no conversion quality loss, double export speed even of HD files due to hardware acceleration
• Stabilization tool will turn shaky or jittery footage into a more stable video automatically.
• Essential toolset for professional video editing: blending modes, Mask tool, advanced multiple-color Chroma Key

disable active tasks task scheduler

To stop automatic Windows shutdown, you’ll need to delete or disable the scheduled task in Windows Task Scheduler . Disabling it is best if you only want to stop it for a temporary amount of time, but if you’re tired of your PC turning off by itself, it’s best to delete it instead.

How to Schedule a Windows 11 Shutdown Using Command Prompt or PowerShell

Task Scheduler is an excellent utility but may feel a little complicated for those who don’t use it often. Maybe you want to make your computer turn off after inactivity, but occasionally. In this instance, creating a scheduled task is unnecessary and tedious.

If you don’t want to go through the learning curve, you can use the shutdown command in Command Prompt. The shutdown command lets you set a shutdown timer to power off and restart your Windows computer automatically.

To schedule a system shutdown using Command Prompt:

  1. Press the Win + X to open the WinX menu.
    automated shut down windows 11 command prompt
  2. Click on Windows Terminal (Admin) to open the elevated terminal.
  3. In the Windows Terminal window, type the following command and press Enter:
    Shutdown /s -t Nseconds
  4. In the above command, replace Nseconds with the number of seconds. For example, if you want to set a timer for 5 minutes (300 seconds), then the complete command will look like this:
    Shutdown /s -t 300
  5. The above command will trigger the Windows logoff action and shutdown your PC after 5 minutes.
  6. If you want to perform a scheduled restart, type the following command and press Enter:
    Shutdown -r -t Nseconds
  7. In the above command, replace Nseconds with the number of seconds to set a timer for a restart.
    automated shut down windows 11 command prompt
  8. If you want to define a specific shutdown time instead, use the at time shutdown /s command. For example, to schedule a shutdown at 12:30 AM, use the following command:
    at 00:30 shutdown /s
  9. To cancel the shutdown or restart the timer, type the following command and press Enter:
    Shutdown -a
  10. You will see a logoff is canceled notification indicating the shutdown has been canceled.

shutdown command parameters command prompt

You can further customize the shutdown task by using the shutdown parameters. For example, use the -f parameter to force close the running application without warning. Additionally, type shutdown and press Enter to view all the available parameters for the shutdown command.

How to Schedule Auto Shut Down Using a Desktop Shortcut

You can create a desktop shortcut with a shutdown timer to turn off your PC . This is useful if you don’t want to run the Command Prompt each time to set a timer.

To create a shutdown timer desktop shortcut:

  1. Right-click on your Windows desktop and select New > Shortcut.
    create new desktop shortct

  2. In the shortcut wizard, type the following command in the Type the location of the item field:
    Shutdown -s -t 300

  3. In the above command, 300 seconds (5 minutes) represents the number of seconds for the timer. You can change the seconds as per your need.

    automated shut down shortcut command

  4. Click Next.

  5. Next, type a name for your shortcut. For example, type ShutDownTimer.
    shutdown timer shortcut name

  6. Click the Finish button to add the shortcut to your desktop.

  7. Next, right-click on the ShutDownTimer desktop shortcut and select Properties.

  8. In the shortcut tab, click on the Change icon.
    shutdowntimer desktop shortcut icon

  9. Select an icon that represents the shortcut best. For this guide, we will select the Power icon.

  10. Click OK to make a selection.

  11. Then, click Apply and OK to save changes.

You can double-click on the ShutDownTimer shortcut to initiate a shutdown. To cancel the shutdown, use the shutdown -a command in Command Prompt.

Automate a Windows Shut Down When It Goes Idle

You can use Command Prompt and Task Scheduler to automate system shutdown in Windows 11 and 10 computers. However, unlike Command Prompt, Task Scheduler offers better task automation and supports more conditions. You can also configure it to automate Windows start-up.

By default, Windows is configured to put your computer to sleep after a few minutes of inactivity. But if you prefer to shut down your computer every day or when idle for a long time, you can use the Task Scheduler to schedule an automatic system shutdown instead.

Here we show you how to schedule a shutdown in Windows 11 and 10 computers.

Easy GIF Animator is a powerful animated GIF editor and the top tool for creating animated pictures, banners, buttons and GIF videos. You get extensive animation editing features, animation effects, unmatched image quality and optimization for the web. No other GIF animation software matches our features and ease of use, that’s why Easy GIF Animator is so popular.

How to Schedule a Windows 11 Shutdown Using Task Scheduler

Task Scheduler is a job scheduling utility available on the Windows operating system. You can use Task Scheduler to run programs automatically on Windows .

You can also use it to create a scheduled task to shut down your PC daily at a specified time. Scheduling a task via Task Scheduler is preferred if you need to repeat a task daily, weekly, or once a month.

To create a shutdown task:

  1. Press the Win key to open the Windows search bar.

  2. Type Task scheduler and click on the app from the search result to open it.

  3. In the Task Scheduler window, click on Action and select Create Basic Task.
    create basic task

  4. In the Basic Task window, type a name for the task. For example, type Shutdown as the name. You can also provide a description of the task.
    task name task scheduler

  5. Click Next.

    daily trigger set date time

  6. Next, select a trigger point. You can choose from Daily, Weekly, Monthly, One Time, etc. For this guide, we will select the Daily trigger to schedule a daily shut down at a specific time.

  7. So, select Daily and click Next.

  8. Next, set the Start date and time for the recurring shut down and click Next.

    start a program task action

  9. In the Action tab, select Start a program and click Next.

    start a program task command

  10. Type shutdown.exe in the Program/Script field and click Next.

  11. Review the changes and click Finish to create and add the new task to your Windows schedule.

That’s it. The Task Scheduler will trigger the shutdown action daily at your specified time and power off your PC.

SwifDoo PDF Perpetual (2-PC) Free upgrade. No monthly fees ever.

How to Automatically Shut Down Windows on Idle via Task Scheduler

If you want, you can add a trigger condition to your shutdown task to determine when the task should run. This is helpful if you want to run the shutdown task after a specified period of inactivity.

For this guide, we will modify the shutdown task created earlier. If you want, you can create a new task as well.

  1. Select your existing shutdown task in the Task Scheduler.
  2. Right-click on the task and select Properties. active task properties task scheduler
  3. Open the Conditions tab in the Properties window. ZoneAlarm Pro Antivirus + Firewall NextGen start the task only if the computer is idle for the option
  4. Select Start the task only if the computer is idle for the option.
  5. In both the time fields, enter the same time. For example, if you enter 10 minutes, the Task Scheduler will wait for the system to be idle for 10 minutes before triggering the Shut down task. You can choose anywhere from a few minutes to two hours.
  6. Click OK to save the changes.

TubeDigger - online video downloader from mostly any site

How to Stop an Automatic Shutdown via Task Scheduler

disable active tasks task scheduler

To stop automatic Windows shutdown, you’ll need to delete or disable the scheduled task in Windows Task Scheduler . Disabling it is best if you only want to stop it for a temporary amount of time, but if you’re tired of your PC turning off by itself, it’s best to delete it instead.

How to Schedule a Windows 11 Shutdown Using Command Prompt or PowerShell

Task Scheduler is an excellent utility but may feel a little complicated for those who don’t use it often. Maybe you want to make your computer turn off after inactivity, but occasionally. In this instance, creating a scheduled task is unnecessary and tedious.

If you don’t want to go through the learning curve, you can use the shutdown command in Command Prompt. The shutdown command lets you set a shutdown timer to power off and restart your Windows computer automatically.

To schedule a system shutdown using Command Prompt:

  1. Press the Win + X to open the WinX menu.
    EmEditor is a fast, lightweight, yet extensible, easy-to-use text editor, code editor, CSV editor, and large file viewer for Windows. Both native 64-bit and 32-bit builds are available, and moreover, the 64-bit includes separate builds for SSE2 (128-bit), AVX-2 (256-bit), and AVX-512 (512-bit) instruction sets. New versions support AI-assisted writing.
    automated shut down windows 11 command prompt
  2. Click on Windows Terminal (Admin) to open the elevated terminal.
  3. In the Windows Terminal window, type the following command and press Enter:
    Shutdown /s -t Nseconds
  4. In the above command, replace Nseconds with the number of seconds. For example, if you want to set a timer for 5 minutes (300 seconds), then the complete command will look like this:
    Shutdown /s -t 300
  5. The above command will trigger the Windows logoff action and shutdown your PC after 5 minutes.
  6. If you want to perform a scheduled restart, type the following command and press Enter:
    Shutdown -r -t Nseconds
  7. In the above command, replace Nseconds with the number of seconds to set a timer for a restart.
    automated shut down windows 11 command prompt
  8. If you want to define a specific shutdown time instead, use the at time shutdown /s command. For example, to schedule a shutdown at 12:30 AM, use the following command:
    at 00:30 shutdown /s
  9. To cancel the shutdown or restart the timer, type the following command and press Enter:
    Shutdown -a
  10. You will see a logoff is canceled notification indicating the shutdown has been canceled.

shutdown command parameters command prompt

You can further customize the shutdown task by using the shutdown parameters. For example, use the -f parameter to force close the running application without warning. Additionally, type shutdown and press Enter to view all the available parameters for the shutdown command.

With Screensaver Wonder you can easily make a screensaver from your own pictures and video files. Create screensavers for your own computer or create standalone, self-installing screensavers for easy sharing with your friends. Together with its sister product Screensaver Factory, Screensaver Wonder is one of the most popular screensaver software products in the world, helping thousands of users decorate their computer screens quickly and easily.

How to Schedule Auto Shut Down Using a Desktop Shortcut

You can create a desktop shortcut with a shutdown timer to turn off your PC . This is useful if you don’t want to run the Command Prompt each time to set a timer.

To create a shutdown timer desktop shortcut:

  1. Right-click on your Windows desktop and select New > Shortcut.

    ![create new desktop shortct](https://static1.makeuseofimages.com/wordpress/wp-content/uploads/2022/02/create-new-desktop-shortct.png)
  2. In the shortcut wizard, type the following command in the Type the location of the item field:
    Shutdown -s -t 300

  3. In the above command, 300 seconds (5 minutes) represents the number of seconds for the timer. You can change the seconds as per your need.

    automated shut down shortcut command

  4. Click Next.

  5. Next, type a name for your shortcut. For example, type ShutDownTimer.
    shutdown timer shortcut name

  6. Click the Finish button to add the shortcut to your desktop.

  7. Next, right-click on the ShutDownTimer desktop shortcut and select Properties.

  8. In the shortcut tab, click on the Change icon.
    shutdowntimer desktop shortcut icon

  9. Select an icon that represents the shortcut best. For this guide, we will select the Power icon.

  10. Click OK to make a selection.

  11. Then, click Apply and OK to save changes.

You can double-click on the ShutDownTimer shortcut to initiate a shutdown. To cancel the shutdown, use the shutdown -a command in Command Prompt.

Automate a Windows Shut Down When It Goes Idle

You can use Command Prompt and Task Scheduler to automate system shutdown in Windows 11 and 10 computers. However, unlike Command Prompt, Task Scheduler offers better task automation and supports more conditions. You can also configure it to automate Windows start-up.

By default, Windows is configured to put your computer to sleep after a few minutes of inactivity. But if you prefer to shut down your computer every day or when idle for a long time, you can use the Task Scheduler to schedule an automatic system shutdown instead.

Here we show you how to schedule a shutdown in Windows 11 and 10 computers.

How to Schedule a Windows 11 Shutdown Using Task Scheduler

Task Scheduler is a job scheduling utility available on the Windows operating system. You can use Task Scheduler to run programs automatically on Windows .

You can also use it to create a scheduled task to shut down your PC daily at a specified time. Scheduling a task via Task Scheduler is preferred if you need to repeat a task daily, weekly, or once a month.

To create a shutdown task:

  1. Press the Win key to open the Windows search bar.

  2. Type Task scheduler and click on the app from the search result to open it.

  3. In the Task Scheduler window, click on Action and select Create Basic Task.

    create basic task

  4. In the Basic Task window, type a name for the task. For example, type Shutdown as the name. You can also provide a description of the task.


    WPS Office Premium ( File Recovery, Photo Scanning, Convert PDF)–Yearly

    task name task scheduler

  5. Click Next.
    daily trigger set date time

  6. Next, select a trigger point. You can choose from Daily, Weekly, Monthly, One Time, etc. For this guide, we will select the Daily trigger to schedule a daily shut down at a specific time.

  7. So, select Daily and click Next.

  8. Next, set the Start date and time for the recurring shut down and click Next.

    start a program task action

  9. In the Action tab, select Start a program and click Next.

    Power Tools add-on for Google Sheets, Lifetime subscription

    start a program task command

  10. Type shutdown.exe in the Program/Script field and click Next.

  11. Review the changes and click Finish to create and add the new task to your Windows schedule.

That’s it. The Task Scheduler will trigger the shutdown action daily at your specified time and power off your PC.

Power Tools add-on for Google Sheets, 12-month subscription

How to Automatically Shut Down Windows on Idle via Task Scheduler

If you want, you can add a trigger condition to your shutdown task to determine when the task should run. This is helpful if you want to run the shutdown task after a specified period of inactivity.

For this guide, we will modify the shutdown task created earlier. If you want, you can create a new task as well.

  1. Select your existing shutdown task in the Task Scheduler.
  2. Right-click on the task and select Properties. Video Converter Factory Pro active task properties task scheduler
  3. Open the Conditions tab in the Properties window. start the task only if the computer is idle for the option
  4. Select Start the task only if the computer is idle for the option.
  5. In both the time fields, enter the same time. For example, if you enter 10 minutes, the Task Scheduler will wait for the system to be idle for 10 minutes before triggering the Shut down task. You can choose anywhere from a few minutes to two hours.
  6. Click OK to save the changes.

How to Stop an Automatic Shutdown via Task Scheduler

disable active tasks task scheduler

To stop automatic Windows shutdown, you’ll need to delete or disable the scheduled task in Windows Task Scheduler . Disabling it is best if you only want to stop it for a temporary amount of time, but if you’re tired of your PC turning off by itself, it’s best to delete it instead.

Screensaver Factory, Create stunning professional screensavers within minutes. Create screensavers for yourself, for marketing or unlimited royalty-free commercial distribution. Make screensavers from images, video and swf flash, add background music and smooth sprite and transition effects. Screensaver Factory is very easy to use, and it enables you to make self-installing screensaver files and CDs for easy setup and distribution. Screensaver Factory is the most advanced software of its kind.

How to Schedule a Windows 11 Shutdown Using Command Prompt or PowerShell

Task Scheduler is an excellent utility but may feel a little complicated for those who don’t use it often. Maybe you want to make your computer turn off after inactivity, but occasionally. In this instance, creating a scheduled task is unnecessary and tedious.

If you don’t want to go through the learning curve, you can use the shutdown command in Command Prompt. The shutdown command lets you set a shutdown timer to power off and restart your Windows computer automatically.

To schedule a system shutdown using Command Prompt:

  1. Press the Win + X to open the WinX menu.
    automated shut down windows 11 command prompt
  2. Click on Windows Terminal (Admin) to open the elevated terminal.
  3. In the Windows Terminal window, type the following command and press Enter:
    Shutdown /s -t Nseconds
  4. In the above command, replace Nseconds with the number of seconds. For example, if you want to set a timer for 5 minutes (300 seconds), then the complete command will look like this:
    Shutdown /s -t 300
  5. The above command will trigger the Windows logoff action and shutdown your PC after 5 minutes.
  6. If you want to perform a scheduled restart, type the following command and press Enter:
    Shutdown -r -t Nseconds
  7. In the above command, replace Nseconds with the number of seconds to set a timer for a restart.
    automated shut down windows 11 command prompt
  8. If you want to define a specific shutdown time instead, use the at time shutdown /s command. For example, to schedule a shutdown at 12:30 AM, use the following command:
    at 00:30 shutdown /s
  9. To cancel the shutdown or restart the timer, type the following command and press Enter:
    Shutdown -a
  10. You will see a logoff is canceled notification indicating the shutdown has been canceled.

shutdown command parameters command prompt

You can further customize the shutdown task by using the shutdown parameters. For example, use the -f parameter to force close the running application without warning. Additionally, type shutdown and press Enter to view all the available parameters for the shutdown command.

How to Schedule Auto Shut Down Using a Desktop Shortcut

You can create a desktop shortcut with a shutdown timer to turn off your PC . This is useful if you don’t want to run the Command Prompt each time to set a timer.

To create a shutdown timer desktop shortcut:

  1. Right-click on your Windows desktop and select New > Shortcut.
    create new desktop shortct

  2. In the shortcut wizard, type the following command in the Type the location of the item field:
    Shutdown -s -t 300

  3. In the above command, 300 seconds (5 minutes) represents the number of seconds for the timer. You can change the seconds as per your need.
    automated shut down shortcut command

  4. Click Next.

  5. Next, type a name for your shortcut. For example, type ShutDownTimer.
    shutdown timer shortcut name

  6. Click the Finish button to add the shortcut to your desktop.

  7. Next, right-click on the ShutDownTimer desktop shortcut and select Properties.

  8. In the shortcut tab, click on the Change icon.

    shutdowntimer desktop shortcut icon

  9. Select an icon that represents the shortcut best. For this guide, we will select the Power icon.

  10. Click OK to make a selection.

  11. Then, click Apply and OK to save changes.

You can double-click on the ShutDownTimer shortcut to initiate a shutdown. To cancel the shutdown, use the shutdown -a command in Command Prompt.

Automate a Windows Shut Down When It Goes Idle

You can use Command Prompt and Task Scheduler to automate system shutdown in Windows 11 and 10 computers. However, unlike Command Prompt, Task Scheduler offers better task automation and supports more conditions. You can also configure it to automate Windows start-up.

By default, Windows is configured to put your computer to sleep after a few minutes of inactivity. But if you prefer to shut down your computer every day or when idle for a long time, you can use the Task Scheduler to schedule an automatic system shutdown instead.

Here we show you how to schedule a shutdown in Windows 11 and 10 computers.

How to Schedule a Windows 11 Shutdown Using Task Scheduler

Task Scheduler is a job scheduling utility available on the Windows operating system. You can use Task Scheduler to run programs automatically on Windows .

You can also use it to create a scheduled task to shut down your PC daily at a specified time. Scheduling a task via Task Scheduler is preferred if you need to repeat a task daily, weekly, or once a month.

To create a shutdown task:

  1. Press the Win key to open the Windows search bar.

  2. Type Task scheduler and click on the app from the search result to open it.

  3. In the Task Scheduler window, click on Action and select Create Basic Task.
    create basic task

  4. In the Basic Task window, type a name for the task. For example, type Shutdown as the name. You can also provide a description of the task.
    task name task scheduler

  5. Click Next.
    daily trigger set date time

  6. Next, select a trigger point. You can choose from Daily, Weekly, Monthly, One Time, etc. For this guide, we will select the Daily trigger to schedule a daily shut down at a specific time.

  7. So, select Daily and click Next.

  8. Next, set the Start date and time for the recurring shut down and click Next.
    start a program task action

  9. In the Action tab, select Start a program and click Next.

    start a program task command

  10. Type shutdown.exe in the Program/Script field and click Next.

  11. Review the changes and click Finish to create and add the new task to your Windows schedule.

That’s it. The Task Scheduler will trigger the shutdown action daily at your specified time and power off your PC.

How to Automatically Shut Down Windows on Idle via Task Scheduler

If you want, you can add a trigger condition to your shutdown task to determine when the task should run. This is helpful if you want to run the shutdown task after a specified period of inactivity.

For this guide, we will modify the shutdown task created earlier. If you want, you can create a new task as well.

  1. Select your existing shutdown task in the Task Scheduler.
  2. Right-click on the task and select Properties. vMix Pro - Software based live production. vMix Pro includes everything in vMix 4K plus 8 channels of Replay and 8 vMix Call
    This bundle includes Studio 200 for vMix from Virtualsetworks, HTTP Matrix 1.0 automation scheduler, and 4 introductory training videos from the Udemy vMix Basic to Amazing course.
    active task properties task scheduler
  3. Open the Conditions tab in the Properties window.
    start the task only if the computer is idle for the option
  4. Select Start the task only if the computer is idle for the option.
  5. In both the time fields, enter the same time. For example, if you enter 10 minutes, the Task Scheduler will wait for the system to be idle for 10 minutes before triggering the Shut down task. You can choose anywhere from a few minutes to two hours.
  6. Click OK to save the changes.

How to Stop an Automatic Shutdown via Task Scheduler

disable active tasks task scheduler

To stop automatic Windows shutdown, you’ll need to delete or disable the scheduled task in Windows Task Scheduler . Disabling it is best if you only want to stop it for a temporary amount of time, but if you’re tired of your PC turning off by itself, it’s best to delete it instead.

How to Schedule a Windows 11 Shutdown Using Command Prompt or PowerShell

Task Scheduler is an excellent utility but may feel a little complicated for those who don’t use it often. Maybe you want to make your computer turn off after inactivity, but occasionally. In this instance, creating a scheduled task is unnecessary and tedious.

If you don’t want to go through the learning curve, you can use the shutdown command in Command Prompt. The shutdown command lets you set a shutdown timer to power off and restart your Windows computer automatically.

To schedule a system shutdown using Command Prompt:

  1. Press the Win + X to open the WinX menu.
    automated shut down windows 11 command prompt
  2. Click on Windows Terminal (Admin) to open the elevated terminal.
  3. In the Windows Terminal window, type the following command and press Enter:
    Shutdown /s -t Nseconds
  4. In the above command, replace Nseconds with the number of seconds. For example, if you want to set a timer for 5 minutes (300 seconds), then the complete command will look like this:
    Shutdown /s -t 300
  5. The above command will trigger the Windows logoff action and shutdown your PC after 5 minutes.
  6. If you want to perform a scheduled restart, type the following command and press Enter:
    Shutdown -r -t Nseconds
  7. In the above command, replace Nseconds with the number of seconds to set a timer for a restart.
    automated shut down windows 11 command prompt
  8. If you want to define a specific shutdown time instead, use the at time shutdown /s command. For example, to schedule a shutdown at 12:30 AM, use the following command:
    at 00:30 shutdown /s
  9. To cancel the shutdown or restart the timer, type the following command and press Enter:
    Shutdown -a
  10. You will see a logoff is canceled notification indicating the shutdown has been canceled.

shutdown command parameters command prompt

You can further customize the shutdown task by using the shutdown parameters. For example, use the -f parameter to force close the running application without warning. Additionally, type shutdown and press Enter to view all the available parameters for the shutdown command.

How to Schedule Auto Shut Down Using a Desktop Shortcut

You can create a desktop shortcut with a shutdown timer to turn off your PC . This is useful if you don’t want to run the Command Prompt each time to set a timer.

To create a shutdown timer desktop shortcut:

  1. Right-click on your Windows desktop and select New > Shortcut.
    create new desktop shortct

  2. In the shortcut wizard, type the following command in the Type the location of the item field:
    Shutdown -s -t 300

  3. In the above command, 300 seconds (5 minutes) represents the number of seconds for the timer. You can change the seconds as per your need.
    automated shut down shortcut command

  4. Click Next.

  5. Next, type a name for your shortcut. For example, type ShutDownTimer.

    CollageIt Pro

    shutdown timer shortcut name

  6. Click the Finish button to add the shortcut to your desktop.

  7. Next, right-click on the ShutDownTimer desktop shortcut and select Properties.

  8. In the shortcut tab, click on the Change icon.
    shutdowntimer desktop shortcut icon

  9. Select an icon that represents the shortcut best. For this guide, we will select the Power icon.

  10. Click OK to make a selection.

  11. Then, click Apply and OK to save changes.

You can double-click on the ShutDownTimer shortcut to initiate a shutdown. To cancel the shutdown, use the shutdown -a command in Command Prompt.

Automate a Windows Shut Down When It Goes Idle

You can use Command Prompt and Task Scheduler to automate system shutdown in Windows 11 and 10 computers. However, unlike Command Prompt, Task Scheduler offers better task automation and supports more conditions. You can also configure it to automate Windows start-up.

Also read:

  • Title: Mastering Wake on Lid Closure in Windows Devices
  • Author: Joseph
  • Created at : 2024-08-08 06:11:47
  • Updated at : 2024-08-09 06:11:47
  • Link: https://windows11.techidaily.com/mastering-wake-on-lid-closure-in-windows-devices/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
Mastering Wake on Lid Closure in Windows Devices