Setting up and monitoring scheduled tasks

How to set when a background task runs automatically for a company, a company group or the whole system, how to start or stop it at once, and how to have stuck runs repaired.

The system's background tasks (for example NAV queries, e-mail processing, integrity checks) all run on one scheduler. Here you set which task runs when and for which company, see the queued runs, and start an immediate run or a repair.

Schedule and queued item

  • Schedule: a recurring definition that runs automatically on its frequency.
  • Queued: a one-off item waiting to run (or running). The scheduler creates these from due schedules, or you do with Run now.

A new schedule step by step

  1. Open System → Cron scheduler.
  2. Click the blue + button (Add) at the top right.
  3. Choose the Job type, for example "NAV missing tax returns".
  4. In Target choose a company (Partner), a Company group, or for system-level jobs "System (all clients)".
  5. If the job runs a specific object, choose it in Related object (E-mail task or Integrity check).
  6. Set Frequency (Every N minutes, Hourly, Daily, Weekly, Monthly), Hour, Minute, Weekday or Day of month.
  7. If you want an e-mail about every run, choose E-mail in How to report the result of each run, then Protocol / sender and Template, and set the recipients with Recipients.
  8. Click Save. The Next run column shows when it starts next.

Actions in the list

ButtonWhat it does
Run now (play icon)queues a run immediately; for a company group, one per member company. The schedule's next run does not change.
Activate, Deactivateswitches the schedule on or off
Stop, Stop selecteddeactivates the selected schedules and removes queued items
Delete (bin)permanently deletes the selected rows and their result e-mail setting
Self-check and repair (heart icon in the header)runs the self-healing immediately and reports how many items were repaired and how many still need attention

For a queued item only the Next run time can be changed.

Rules and messages

  • Without a target: "Please select a target company or company group!"
  • If the same job is already scheduled for the same object and target, no second one is created; edit the existing row instead.
  • For an e-mail task, company and timing come from the e-mail task; if it has no target company: "The selected e-mail task has no target client company — set it on the e-mail task first!"
  • System-level rows (without company and group) can only be managed by the super administrator.
  • A warning shown in a row means an error the self-healing could not repair.

Example

For the Example plc company group a weekly NAV tax account query is set for Monday 6:10, with a result e-mail to the accountant. After saving, Next run shows next Monday 6:10. Because fresh data is needed today, they start it with Run now: a separate queued item is created for each of the group's three companies.

Related topics: scheduling background job