Task Scheduler

Table of contents

  1. Create a New Task
  2. Name the Task
  3. Setup the Schedule
  4. Set the Application and Arguments
  5. Configure Task Settings

Create a New Task

task-scheduler-1

Inside Task Scheduler, select the Action menu button and click Create Task…

Name the Task

task-scheduler-2

Give the task a name so you’ll know what it’s for. In this case, this task will be setup to run deemon refresh so that’s what I’ve named it.

Setup the Schedule

task-scheduler-3

This is where Task Scheduler becomes a little cumbersome. If you want to run a task every few minutes/hours, you have to select Daily (1) and under Advanced settings check the box to repeat the task (2). The drop down box for Repeat task every: doesn’t give many options, but thankfully you can type in your preference. I went ahead and put in 12 hours with a duration of indefinitely.

With these settings, our task will run every 12 hours until we disable it.

Set the Application and Arguments

task-scheduler-4

Under Program/script (1) we need to set the absolute path to deemon:

_%localappdata%\Programs\Python\Python39\Scripts\deemon.exe

Under Add arguments (optional) (2) is where you put the deemon command you wish to run. Since this task is being setup for doing a refresh, we only need to put refresh in this box. When Task Scheduler runs this task, it would be the equivalent of typing deemon refresh at a command prompt.

Configure Task Settings

task-scheduler-5

Here you can configure your various preferences with how to handle various situations/conditions. The most important ones are:

(1) Allow task to be run on demand

(2) Run task as soon as possible after a scheduled start is missed

This will allow us to manually run the task to test it and will also run the task if your computer was off or sleeping the last scheduled run.