Lesson 4

Common Job Patterns

Every N minutes, weekday mornings, monthly backups, and health probes.

Most production cron lines fall into a small set of patterns. Recognizing them speeds reviews and reduces copy-paste errors.

Every N minutes

*/5 * * * *    # every 5 minutes
*/15 * * * *   # every 15 minutes

Use for health probes, queue drainers, and metrics scrapers. Watch job runtime: if a run can exceed the interval, add locking or lengthen the period.

Hourly on the hour

0 * * * *

Good for rolling summaries and cache refreshes. For “hourly at minute 30,” use 30 * * * *.

Daily at a fixed local time

0 2 * * *      # 02:00 every day
0 9 * * *      # 09:00 every day

Common for log rotation (02:00) and daily reports. Confirm server timezone or K8s timeZone before assuming “night.”

Weekdays only

0 9 * * 1-5    # 09:00 Monday–Friday (Unix DOW 1–5)

Business-hour batch jobs often pair weekday filter with hour range:

0 9-17 * * 1-5   # every hour 09:00–17:00 weekdays

Verify whether your platform uses 0 or 1 for Monday in documentation examples.

Weekly

0 0 * * 0      # Sunday at midnight (0 = Sunday on many systems)
0 3 * * 1      # Monday at 03:00

Weekly builds and digest emails usually land here.

Monthly

0 3 1 * *      # 03:00 on the 1st of each month
0 0 15 * *     # midnight on the 15th

Database backups and invoice runs often use day-of-month 1 or a low-traffic maintenance window.

“Never” patterns to flag in review

ExpressionRisk
* * * * *Runs every minute—load surprise
*/1 * * * *Same as above
Overlapping DOM + DOW without understanding ORUnexpected extra runs
Missing timezone note on UTC platformsFires at wrong local hour

Key takeaway

Start from a named pattern (hourly, weekday morning, monthly backup), map it to fields, then adjust minute/hour. Scenario builders encode these templates—learn the grammar so you can spot when a template does not match your platform.

When you want to practice, use the related DevCove tool — optional, not part of this lesson.

Open related tool

Back to course overview