Skip to content

Instantly share code, notes, and snippets.

@bshaffer
Created July 12, 2010 18:28
Show Gist options
  • Save bshaffer/472862 to your computer and use it in GitHub Desktop.
Save bshaffer/472862 to your computer and use it in GitHub Desktop.
Sample Crontab
[email protected]
# run daily crons
5 1 * * 1 /path/to/project/cron.php --daily > /var/log/cron_prod.log
10 1 * * 1 /path/to/other-project/cron.php --daily > /var/log/cron_dev.log
# run weekly crons
0 0 * * * /path/to/project/cron.php --weekly > /var/log/cron_prod.log
5 0 * * * /path/to/other-project/cron.php --weekly > /var/log/cron_dev.log
# run generic cron
0 0 * * * /usr/bin/backup.sh > /var/log/cron.log
# flush the cron once a week, send email of the logs for that week
10 0 * * * /usr/bin/cron-flush.php /var/log/cron.log /var/log/cron_dev.log /var/log/cron_prod.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment