25.11 Scheduling

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.

25.11.1 Creating a job

  1. Open the Scheduler app and click the add button in the bottom right corner.

  2. Choose a suitable Name for the new job.

  3. Select a running frequency for the job, i.e. when and how often the job should run.

    1. You can either select a pre-defined frequency from the dropdown-menu, or …

    2. You can give the job a custom Cron expresssion if you want a specific schedule.

    3. 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.

  4. Select the Job type you want to schedule using the dropdown-menu.

  5. 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.

  6. 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.

25.11.2 Configuring a job

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:

  1. Select a job from the landing page to unveil the Attributes and change them to accordingly. See the previous section for scheduling details.

  2. If the job type supports extra options, the Parameters section will also be available.

  3. When done, press the Save changes button to persist the changes.

25.11.3 Deleting a job

  1. Select the job you want to delete.

  2. Press the Delete button in the bottom right corner.

  3. Confirm by pressing Delete again in the popup window.