The cron syntax is one of those things that takes about ten minutes to learn and ten years to retain. Five fields, ranges, steps, lists, the difference between */5 and 0,5,10,15,...,55 — and the test cycle of write entry, wait an hour, see if it ran is famously slow. Asking by intent is faster.
Five real schedules
Every 5 minutes during business hours
$ clai cron line: every 5 minutes from 9 to 17 on weekdays→ */5 9-17 * * 1-5
First day of the month
$ clai cron line: 02:30 on the first day of every month→ 30 2 1 * *
Every Monday at 3 AM
$ clai cron line: every Monday at 03:00→ 0 3 * * 1
Every 15 minutes, but skip 23:00–06:00
$ clai cron line: every 15 minutes between 06:00 and 22:59→ */15 6-22 * * *
Hourly, weekdays only
$ clai cron line: at the top of every hour, Monday through Friday→ 0 * * * 1-5
Verifying what you've got
Before you commit a schedule to crontab -e, list what's already there:
$ clai show my current crontab→ crontab -l
A small caveat
Cron schedules are interpreted in the timezone of the cron daemon, which is usually the system timezone. If your "every Monday at 3 AM" needs to mean 3 AM London time on a UTC server, make that explicit in the prompt — "every Monday at 3 AM London time, expressed in UTC" — and you'll get 0 3 * * 1 adjusted accordingly (or the entry will set CRON_TZ=Europe/London if your daemon supports it).
See also
- Cleanup old logs and backups — the natural place a "weekly" cron entry lives.
- From one-liner to script — the moment a cron job earns its own checked-in script.