Small Tools

Scheduling · Developer Guide

How Cron Expressions Work

Before deploying a scheduled job, check both the expression and the scheduler that executes it. A valid expression alone does not establish its timezone, daylight-saving behavior, or overlap policy.

What is a five-field cron expression?

The fields are minute, hour, day of month, month, and day of week. Small Tools uses numeric five-field syntax. It is not a Quartz parser and does not accept a leading seconds field, named weekdays, or macros such as @daily.

How to read a schedule

The parser lists each field and checks numeric bounds. The generator provides presets; select a preset and copy its expression into the scheduler configuration. It does not create a running job.

Weekdays at 09:00 in the scheduler's configured timezone
0 9 * * 1-5
│ │ │ │ └─ day of week
│ │ │ └─── month
│ │ └───── day of month
│ └─────── hour
└───────── minute

Example: periodic maintenance

Use */15 * * * * for minutes 0, 15, 30, and 45 of each hour. A step is evaluated within its field; */15 does not mean fifteen minutes after the previous execution finishes.

For a weekday report, use 0 9 * * 1-5 and configure the execution timezone explicitly in your scheduler. Test around a daylight-saving change if your selected zone observes one.

Common mistakes

  • Adding seconds to a five-field scheduler: 0 */5 * * * * has six fields and is rejected by this parser.
  • Confusing month and day-of-month positions: 0 0 1 * * is the first day of every month.
  • Restricting both day fields without checking semantics: traditional cron can match either restricted day-of-month or day-of-week; other schedulers differ.
  • Assuming a schedule prevents overlapping runs: long jobs need a lock, queue, or scheduler concurrency policy.

Practical deployment checklist

  • Check the target scheduler's accepted syntax and timezone setting.
  • Inspect several upcoming execution times in that scheduler, including month boundaries and daylight-saving transitions.
  • Make the job safe to retry and define how missed or overlapping runs are handled.
  • Alert on job failures and missing expected runs, rather than assuming the expression guarantees completion.

Limits and privacy

The local parser explains fields; it does not compute upcoming executions or validate a particular hosted scheduler's behavior. Schedule input stays in your browser. Avoid including production command lines or credentials when a bare expression is enough.

Related tools

References

Browse all developer guides →