A scheduled task is often the best way to run scripts automatically if you are trying to automate something in Windows 10. The task scheduler can present a somewhat complicated interface, but it is quite easy to configure a basic task with multiple triggers and actions.
Once a task is configured, it must be manually enabled, and if necessary, you can automatically disable a scheduled task from the "Triggers" tab. And here we tell you how.
Automatically disable a scheduled task
First, open the Task Scheduler and click Create to create a new task, or if you want to automatically disable a task that has already been created, you must search for it in the Task Library and double-click to edit it.
Regardless of whether you are creating a new task or if you are editing an existing one, you should go to the "Triggers" tab to set when it will be automatically deactivated.
Also, the "Activators" tab will list all the triggers you have set for the task and can be more than one. Now, select a trigger and then double click to edit it. At the bottom, you will see a “Stop the task if it lasts longer” option and a drop-down menu next to it.
This drop-down menu is quite restricted in your options, but you can check it to see if they do the job. If not, you can see a little below and you will see the option «Expires».
Also, this option is specific to the activator you are currently editing and is flexible are only in terms of date, but also of time. Similarly, open the calendar to select when the trigger will expire and then set a time for it as well.
Also, repeat this for all triggers you have set for the task you wish to disable. Now, you must click OK and enable the task in question.
How does it work?
The task is, technically speaking, still enabled. Think about this this way; You have turned on the switch of a lit bulb but you have removed the wiring that provides electricity. The triggers and their expiration date are basically that.
So, once the triggers expire, the task no longer knows when to run. Not only will you start executing actions you want, so this basically disables them.
Similarly, this method has a problem; the task will continue to appear as "List" in the task scheduler. The description of it will automatically include a statement indicating that the task has a trigger that expires on a particular date.
And finally, if you are attentive enough to detect it, you will know why a task is no longer running.