Learn cron shorthand aliases: @daily, @hourly, @weekly, @monthly, @yearly, @reboot. Easier than remembering expressions.
Cron provides several shorthand aliases that replace common 5-field expressions: @yearly (or @annually) runs once a year at midnight on January 1st (equivalent to 0 0 1 1 *). @monthly runs at midnight on the 1st of every month (0 0 1 * *). @weekly runs at midnight every Sunday (0 0 * * 0). @daily (or @midnight) runs at midnight every day (0 0 * * *). @hourly runs at the top of every hour (0 * * * *). @reboot runs once after the system starts up — this is not a recurring schedule but a one-time trigger. These shortcuts are supported by Vixie Cron (the default cron daemon on most Linux distributions including Ubuntu, Debian, and CentOS). They may not work on all cron implementations — for example, BusyBox cron and some minimal containers do not support them. If you need maximum portability, use the equivalent 5-field expression instead. The @reboot shortcut is particularly useful for starting services or running initialization scripts after a system restart. Unlike the time-based shortcuts, @reboot does not repeat — it fires once per boot. Note that on systemd-based systems, @reboot may fire before all network interfaces are fully up, so add a sleep or retry logic if your script requires network access. On Quartz Scheduler, these shortcuts do not exist — you must use the full 7-field expression. AWS EventBridge uses rate() for simple intervals and cron() for complex schedules. Kubernetes CronJob uses the standard 5-field format. Vercel Cron and GitHub Actions support some shortcuts but recommend explicit expressions for clarity.
The expression @daily means: . Each field in the cron expression controls a different time component: minute, hour, day of month, month, and day of week.
Run crontab -e in your terminal to open your crontab editor. Add a new line: @daily /path/to/your/script.sh. Save and exit. Verify with crontab -l. Make sure your script is executable (chmod +x script.sh) and uses full paths for all commands.
Cron @ shortcuts like @daily are a convenience feature in Vixie Cron (the default on most Linux systems). Quartz uses 7-field expressions instead. AWS EventBridge uses rate() or cron() syntax. Kubernetes supports some @ shortcuts depending on the implementation.
Common pitfalls: (1) Cron uses a minimal PATH — always use full paths to commands and scripts. (2) Percent signs (%) must be escaped with backslash in crontab. (3) Cron runs in the system timezone — set CRON_TZ=UTC at the top of your crontab for consistent UTC scheduling. (4) Redirect output to prevent email spam: @daily /path/command >> /var/log/myjob.log 2>&1. (5) Test your cron expression with crontab.guru or our validator above before deploying.
The cron shortcut @daily expands to different expressions on various scheduling platforms:
| Platform | Expression |
|---|---|
| Unix / Linux crontab | @daily |
| Quartz Scheduler (Java) | 0 0 * * ? |
| AWS EventBridge | cron(0 0 * * ? *) |
| Kubernetes CronJob | 0 0 * * * |
| Vercel Cron | 0 0 * * * |
| GitHub Actions | 0 0 * * * (UTC) |
The @ shortcuts are a convenience feature of Vixie Cron (the default cron daemon on most Linux distributions). They translate to standard 5-field expressions internally. Not all platforms support these shortcuts — Quartz, AWS, and Kubernetes require the full expression form. Vercel Cron and GitHub Actions do support some @ shortcuts, but using the explicit 5-field form is more portable across platforms.
Follow these tips when setting up cron jobs in production: