How to automatically disable a scheduled task on Windows 10
Scheduled tasks are often the best way to automatically run scripts if you’re trying to automate something on your Windows 10 PC. The task scheduler may present a somewhat complicated interface but it is pretty easy to set up a basic task with multiple triggers and actions. Once a task is set up, it needs to be enabled manually and if you need to, you can automatically disable a scheduled task from the Triggers tab. Here’s how.
Automatically disable scheduled task
Open Task Scheduler and click Create Task to create a new task or, if you want to automatically disable a task that’s already been created it, look for it in the tasks’ library and double-click it to edit it.
Regardless if you’re creating a new task or editing an existing one, you need to go the Triggers tab to set when it will be disabled automatically.
The Triggers tab will list all the triggers that you’ve set for the task and they may be more than one. Select a trigger and double-click it to edit it. At the bottom, you will see an option ‘Stop the task if it runs longer than’ and a dropdown next to it. This dropdown is very restricted in its options but go through them to see if they do the job. If not, look a little further below and you will see an ‘Expires’ option.
The Expires option is specific to the trigger that you’re currently editing and it is flexible not just in terms of date but also time. Open the calendar to select when this trigger will expire, and then set a time for it as well. Repeat this for all triggers that you’ve set for the task that you want to disable. Click Ok, and enable the task.
On the selected date & time, the task will no longer run.
How it works
The task is, technically speaking, still enabled. Think of it like this; you’re turned the switch to a light bulb On but you’ve removed the wiring that provides it electricity. The triggers and their expiration date are basically that. Once the triggers expire, the task no longer knows when to run. It isn’t simply going to start executing its actions whenever it likes so this basically disables it.
This method does have a downside; the task will still appear as ‘Ready’ in the Task Scheduler. Its description will automatically include a statement that tells the task has a trigger expiring at a particular date. If you’re vigilant enough to spot it, you will know why a task is no longer running.