Automation & scheduling

AfriPhish can run time-driven work for you — firing scheduled campaigns, reminding people about due training, chasing overdue coaching, and emailing a weekly digest. These jobs are driven by an external scheduler, so they need one piece of setup before they run.

Requires setup — the scheduled jobs below run only when a scheduler (for example, Google Cloud Scheduler) calls the platform's internal cron endpoints, and those endpoints stay inert until a cron secret is configured. Without that, on-demand actions still work; the automatic, time-based ones don't fire on their own.

What can run on a schedule

Recurring / scheduled campaigns

  • Scheduled campaigns — set a future send time and the campaign parks as scheduled, then auto-launches when its time arrives.
  • Series — run campaigns automatically on a recurring cadence (for example weekly, monthly, or quarterly), optionally auto-enrolling anyone caught into remedial training.

Due campaigns roll forward when their time comes; a scheduler ping keeps them firing reliably even when no one is looking at the console.

Training reminders & overdue coaching

A daily job (POST /api/v1/cron/training-reminders):

  • Reminds users of training due soon or overdue.
  • Summarises outstanding training to tenant admins (Notifications → training due).
  • Dispatches the seeded overdue coaching intervention for assignments past their due date.

Weekly digest

A weekly job (POST /api/v1/cron/weekly-digest) emails tenant admins a summary of recent campaigns and click rate, training completion, and average risk (Notifications → weekly digest).

How the schedule is wired

PieceRole
Scheduler (e.g. Cloud Scheduler)Calls each cron endpoint on its cadence (daily / weekly)
Cron secretA shared header (X-Cron-Secret) the scheduler must send
Cron endpoints/cron/training-reminders, /cron/weekly-digest — return 503 until the secret is set, and 403 on a wrong secret

Because the endpoints self-guard on the secret, they're safe to expose: they simply do nothing until an operator configures the shared secret and points a scheduler at them.

Notifications

Which of these emails a tenant admin actually receives is controlled under Settings → Notifications (campaign updates, training-due, weekly digest, risk alerts). The scheduler decides when jobs run; notification preferences decide who hears about them.


Next: API reference.