contentintech
Tools

Cron

Read five-field schedules and avoid timezone and overlap surprises.

Schedule fields

minute hour day-of-month month day-of-weekStandard five-field order; platform formats can differ
0 9 * * 1-5Run at 09:00 Monday through Friday
*/15 * * * *Run every 15 minutes
0 0 1 * *Run at midnight on the first day of each month

Common schedules

0 * * * *Run at the start of each hour
30 18 * * *Run at 18:30 every day
0 10 * * 0Run on Sundays at 10:00
0 0 * * *Run daily at midnight in the scheduler timezone

Local crontab

crontab -lInspect your current crontab
crontab -eEdit your user crontab
/usr/bin/python3 /srv/task.py >> /srv/task.log 2>&1Use absolute paths and redirect both streams
flock -n /tmp/task.lock /srv/task.shOn Linux, skip overlapping runs when flock is available

Section navigation