Reference
Cron Syntax Reference
Cron fields and schedule mistakes for API jobs and webhook retries.
Overview
Cron expressions are compact schedule rules. For API operations, they often control sync jobs, webhook retries, report generation and cache refreshes. Debugging a cron issue means checking field count, timezone, platform syntax and whether the job environment matches the API environment.
Debugging Reference Table
| Expression | Meaning | Debugging note |
|---|---|---|
| */5 * * * * | Every 5 minutes | Check rate limits before scheduling frequent API polling. |
| 0 * * * * | At the start of every hour | Server timezone can shift the apparent run time. |
| 0 9 * * 1-5 | 09:00 Monday through Friday | Weekday numbering may differ by platform. |
| 0 0 1 * * | Monthly on day 1 | Good for billing/reporting, but consider timezone boundaries. |
| 0 0 * * 0 | Weekly on Sunday | Confirm whether Sunday is 0 or 7 for your scheduler. |
| 0 */6 * * * | Every 6 hours | Useful for batch API sync jobs. |
| 0 9-17 * * 1-5 | Hourly during business hours on weekdays | DST and local timezone can affect user-facing expectations. |
Reference Table Coverage
- Five-field cron expressions.
- Timezone-sensitive API jobs.
- Webhook retry and sync schedules.
- Platform-specific cron syntax differences.
API Debugging Examples
- A sync job appears late because the server runs UTC while the team expects local time.
- A six-field expression with seconds is pasted into a scheduler that expects five fields.
- A retry job polls too often and causes 429 rate-limit responses.
Common Mistakes
- Using six fields in a five-field scheduler.
- Ignoring server timezone.
- Assuming every cron implementation supports the same special syntax.
- Scheduling API polling without considering rate limits.
FAQ
Why does my cron job run at the wrong hour?
Most often the scheduler timezone differs from the timezone used by the person reading the schedule.
Do all cron systems support seconds?
No. Standard cron has five fields, while some platforms add a seconds field.
Can cron cause API rate-limit problems?
Yes. Frequent schedules or synchronized jobs across many tenants can create bursts of requests.