Scheduled jobs and cron for business processes
How to run nightly exports and reminders reliably: time zones, overlap, and what to do when yesterday's job is still running.
A schedule is a contract with operations
A cron expression (or a cloud scheduler) says when work should start. It does not say what happens if the last run is still going, if the clock jumps, or if the downstream API is down.
Design the job, not just the timetable
- Idempotent runs. Re-running Tuesday’s export should not duplicate invoices (API idempotency).
- Overlap lock. If Monday is late, Tuesday waits or you alert — you do not start a second writer.
- Time zones. “Midnight” for whom? Store UTC; display local.
- Catch-up policy. Skip, or process the gap? Write it down.
Observability
A green scheduler means “I fired.” It does not mean “the file landed.” Alert on output (row counts, object exists) and on duration. See observability.
Related
Last verified: August 2026. Technology and pricing change — always confirm current details with the vendor.