crontab flags & options
-e
Edit the current user's crontab file.
crontab -e
-l
List the current user's crontab entries.
crontab -l
-r
Remove the current user's crontab entirely.
crontab -r
-u
Operate on a specific user's crontab.
crontab -u www-data -l
sudo crontab -u deploy -e
Cron syntax: minute hour day month weekday
Schedule format uses five fields: minute (0-59), hour (0-23), day of month (1-31), month (1-12), weekday (0-7, 0 and 7 are Sunday).
# Every day at 2:30 AM
30 2 * * * /usr/local/bin/backup.sh
# Every Monday at 9 AM
0 9 * * 1 /usr/local/bin/report.sh
# Every 15 minutes
*/15 * * * * /usr/local/bin/health-check.sh
# First day of every month at midnight
0 0 1 * * /usr/local/bin/monthly-cleanup.sh