The task scheduler¶
The scheduler runs the platform's recurring background jobs — the
daily digest, nightly re-indexing, PIM imports, turnover reminders, and
various housekeeping tasks. The scheduler screen (/scheduler) lists these
tasks and their status; each task links to its run history.
How tasks run¶
The runner is an in-process job that fires every minute (it is not an OS cron hitting a URL, and there's no public trigger endpoint). Each minute it selects the site's scheduled tasks and runs any whose scheduled time matches the current minute:
- A task's frequency is daily (runs once at a set time) or hourly (runs each hour at a set minute). There are no cron expressions or arbitrary intervals.
- A task's name is the automation method it runs — the scheduler dispatches by name.
- An app-cache lock (per task, site, and scheduled minute) prevents the same task running twice in the same window across servers.
- Tasks run per-site or globally (site 0). One host is deliberately excluded from running the automation loop.
Each run writes a task log entry with a progress percentage and, on failure, an error message; finishing stamps an end time and marks the task complete. This is the same log the rebate calc issues report reads.
What the scheduler shows¶
- Task list — one row per task: name, recent run count, status, last run, type (scheduled vs manual), a progress bar, and time taken. Only system-owned tasks appear.
- Task detail — the run history for a task: start/end times, progress, info and error messages per run.
A task can be run manually ("run now") from the screen, which triggers the same dispatch the scheduler uses.
The jobs that run¶
Representative scheduled jobs (the automation methods dispatched by name):
- Digests — daily news digest, financial digest, conference digest, PIM digest, turnover digest.
- Re-indexing — nightly news, contacts, documents, PIM products, turnover; sticky-news refresh.
- Reminders and housekeeping — turnover reminders, product-profile updates, deal-permission repair, rebate-move processing, cache purges, system cleanup.
- Imports/exports — FTP ingest, Sage Intacct import, spend-data export.
Note that rebate calculation is not a scheduled job — it's a one-off task created on demand (when a deal recalculates) that uses the same task log for progress tracking and the calculation log. See the rebate management dashboard.
Creating and editing schedules¶
The scheduler screen is read-and-run only — it lists, shows history, and triggers tasks. There is no UI to create, edit, enable, or delete a scheduled task; the schedule definitions (name, frequency, time) are maintained directly in the database.
Who can use it¶
The scheduler screen and its actions require a logged-in user with the
base view permission; there is no finer role check on listing,
viewing history, or running a task.
Security caveat: a legacy admin task-runner endpoint (admin.runTask)
exists on a handler whose events are whitelisted/public — it is
reachable without authentication, unlike the scheduler screen's own
run action.
Why does a task not run (or run twice)¶
- It didn't fire — its frequency/time didn't match a run minute, it's
a one-off (not
scheduled) task, or the excluded host was the only one up. - It shows "already running" — the per-minute lock was held (a prior run of the same task/site/minute is still in the cache window).
- A run failed — the task log carries the error; check task detail.
What the scheduler is not¶
- Not the event-driven task/to-do system — closing tasks on business events (document approval, invoice paid) is a separate feature that does not run through this scheduler.
- Not a user reminder system — these are system background jobs.
Related pages¶
- Automated task catalog — what each documented scheduled job does
- The rebate aged debt and calc issues reports — reads the rebate-calculation task log
- News posts and the daily digest — a scheduled digest job
- Site settings reference