What is a cron job? Cron syntax explained with examples
Blog post from Upsun
Cron jobs are scheduled commands that a background program checks for every minute, with each crontab entry pairing a command with a five-field expression for minute, hour, day of month, month, and weekday. Asterisks, ranges, lists, and step values let users define schedules, such as running a task at 9 a.m. on weekdays, though exact behavior can vary across schedulers. Reliable use requires accounting for the server’s time zone, cron’s limited environment, missing failure alerts, possible overlapping runs, and syntax pitfalls; logging and monitoring help reveal problems. Cron works best for short tasks at fixed times, while continuous, lengthy, event-driven, or retry-sensitive work is better handled by background workers or workflow schedulers. Frameworks often provide scheduling tools but still need a process to run them, and schedules embedded in web applications can run multiple times when the app is scaled out. On Upsun Cloud, cron jobs are defined in `.upsun/config.yaml`, run at intervals of at least five minutes, may start after a randomized delay of up to 20 minutes, and have platform-specific limits and run history available in the Console.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Kubernetes | 1 | 4,377 | 419 | 114 | -15% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.