Crontab Syntax Explained: How OS-Level Cron Differs from WordPress WP-Cron
Crontab is a Unix-based scheduling system that uses a five-field time syntax — minute, hour, day, month, and weekday — followed by the command to execute. Common notations include step values (*/5 for every 5 minutes), ranges (1-5 for Monday through Friday), and comma-separated lists for specific values. Users manage their scheduled jobs via crontab -e to edit, crontab -l to list, and crontab -r to delete all entries, with changes taking effect immediately upon saving. A key difference from interactive shell sessions is that cron runs with a minimal PATH, meaning commands must often be specified with their full file path to avoid 'command not found' errors. Unlike WordPress's built-in WP-Cron, which relies on site traffic to trigger events, OS-level cron runs independently on a true time-based schedule, making it more reliable for server-side task automation.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in