Skip to content

Automated task catalog

This is the reference for the platform's documented scheduled tasks — the background jobs the task scheduler runs by name. It covers the 18 automation functions flagged for documentation; internal reindex/housekeeping jobs (search optimization, nightly re-indexes, cache purges) are not listed here.

How to read this

  • When it runs — the outer schedule is a daily/hourly time-of-day match set on the task's database row; several tasks also gate themselves in code (e.g. skip Sundays, only run on the 1st). Both are noted.
  • Scope — most tasks run per site (for the tenant whose schedule fired). A few are global (all sites at once); those are called out.
  • Tasks with no run-time gate rely entirely on their schedule row for cadence.

Digests and reminders (email)

Daily news digest (dailyDigest)

Emails the day's news digest to digest-subscribed contacts. Skips Sunday; on Monday it covers Saturday's news; otherwise the previous day. Honors each contact's tailored digest preference. Per site.

Secure digest (secureDigest)

A near-duplicate of the daily digest with per-contact tailoring disabled.

PIM daily digest (pimDigest)

Emails a digest of the previous day's product-import (PIM) activity to digest contacts. Skips Sunday. Per site.

Turnover reminder (turnoverReminder)

Chases suppliers who are behind entering turnover figures, emailing the supplier's figuresEntry-role contacts a link to the figures screen. Only sends on Mondays, and only in the middle of the month (a gentle reminder days 8-13, a sterner one days 14-20; nothing in the first or last week). Per site.

Turnover digest (turnoverDigest2)

Sends per-member turnover/figures digests to contacts who opted in, at their chosen cadence — daily for everyone, plus weekly on Mondays and monthly in the first week of the month. Per site.

Task reminders (taskReminders)

Hourly dispatch of due workflow-task reminders for the current site (looks an hour ahead, idempotent). Per site.

Task reminder dispatch (taskReminderDispatch)

The global twin of the above — dispatches due task reminders across all sites at once. Only one of these two should be scheduled to avoid double-sending.

Weekly healthcheck digest (healthcheckWeeklyDigest)

Emails an operations health summary (this week vs last: request volume, response times, errors, top users/events) as a PDF to the site's support email addresses. Per site.

Security and monitoring

Suspicious activity sweep (suspiciousActivityCheck)

Hourly security sweep: flags users whose deal-view/document-download volume is far above their own baseline (and optionally bot-like access patterns), emailing a per-user activity report (PDF) to the configured recipients and writing the alert back into the audit trail. Gated by the suspicious-activity settings; a cooldown prevents repeat alerts. Per site. Thresholds are in site settings.

Missed task check (missedTaskCheck)

A global watchdog: checks that every tenant's daily scheduled tasks actually ran today and emails an ops digest of any misses.

Rebates, spend, and projections

Rebate moves (rebateMoves)

On a rebate's scheduled payment date, moves its holding payments to paid and re-indexes the affected deals. Runs off today's date. Per site. See recording rebate payments.

Update product profiles (updateProductProfiles)

Rebuilds each member's product-category spend profile from the last 12 months of turnover (used by, e.g., the DCQ recipient derivation and category analytics). Per site; writes to the product-profile table only, no email.

Update totals from ERP (updateTotalsFromERP)

Backfills the external (ERP) total onto recent turnover figures and auto-flags green any figure whose ERP total matches the reported value within 1% (see the turnover dashboard). Processes figures added in the last month.

Projection accuracy check (projectionAccuracyCheck)

Compares stored turnover projections against the actuals that followed (over the last 12 months, excluding the current month) and records the variances (see the forecasting system reference). Per site; no email. Intended monthly, but relies on its schedule row for cadence.

Export spend data (exportSpendData)

Exports the site's turnover table to a CSV on AWS S3 (for analytics/Aurora), covering roughly the last one-to-two years. Per site; overwrites the site's export file each run.

Financial digest (financialDigest)

Intended to build a finance rebate summary, but currently produces no output — it computes figures and discards them, sending and writing nothing.

ERP imports (Intact)

Intact invoice import (intactImport)

Pulls purchase-ledger invoices from the Intact ERP (via a configured proxy) into the spend/ERP search index and maps invoice lines to turnover streams — the data behind ERP reconciliation. Batched over a configurable look-back (default ~180 days). Per site; driven by the site's ERP settings.

Intact product import (intactProductImport)

Imports/updates products from Intact into the PIM product index (last ~31 days of changes). Per site.

Cross-cutting notes

  • Sender/test addresses: several digest tasks contain commented-out test email addresses; the missed-task watchdog and Intact product import contain live hard-coded values (an ops address and an ERP host). These should be moved to configuration.
  • Global vs per-site: updateTotalsFromERP, missedTaskCheck, and taskReminderDispatch operate across all tenants; everything else is scoped to the firing site.
  • Self-scheduling: where a task gates its own day/period in code (news digests skipping Sunday, healthcheck on a fixed weekday, turnover reminders mid-month), the database schedule still has to fire it that day — the two must agree.