The Scheduler is an application for managing background jobs in DHIS2. Background jobs can do a number of tasks, such as running analytics, synchronizing data and meta data, or sending a push analysis report. The application provides the ability to create, modify and delete such jobs.
The Scheduler comes bundled with DHIS2 and is accessed through the App Menu.
The start page of the Scheduler app shows an overview of existing jobs. By default, pre-defined system jobs are hidden. To view these, toggle Show system jobs in the top right corner.
When you create or modify a job, it will be rescheduled according to selected preferences. To run a job on demand, press the green triangle labeled “Run now”. This action is only available for enabled jobs.
Open the Scheduler app and click the add button in the bottom right corner.
Choose a suitable Name for the new job.
Select a running frequency for the job, i.e. when and how often the job should run.
You can either select a pre-defined frequency from the dropdown-menu, or …
You can give the job a custom Cron expresssion if you want a specific schedule.
Enabling the Continuous execution option will make the job run constantly. In other words, as soon as the job finishes, it will be scheduled to run again right away. Selecting this option will disable the other fields.
Select the Job type you want to schedule using the dropdown-menu.
If the job type is customizable, a Parameters section will appear below. These additional options specify the details of the scheduled job, and will vary greatly depending on the job type.
Press the Add job button to confirm the job creation. The newly created job should now be listed in the job overview, given that the Show system jobs setting is not enabled.
Jobs are enabled by default.
With the proper permissions, you can modify the details of user-created jobs. Note that for system jobs, only the schedule (cron expression) can be changed.
To quickly enable or disable a user created job from running, use the Enabled column on the landing page of the Scheduler app. System jobs are always enabled.
Further configuring a job:
Select a job from the landing page to unveil the Attributes and change them to accordingly. See the previous section for scheduling details.
If the job type supports extra options, the Parameters section will also be available.
When done, press the Save changes button to persist the changes.
Select the job you want to delete.
Press the Delete button in the bottom right corner.
Confirm by pressing Delete again in the popup window.