Skip to content

Instantly share code, notes, and snippets.

@Chrisedmo
Forked from khalwat/crontab_helper
Created July 20, 2016 14:27
Show Gist options
  • Save Chrisedmo/86155c592bd2dff6138eb48f59719d1c to your computer and use it in GitHub Desktop.
Save Chrisedmo/86155c592bd2dff6138eb48f59719d1c to your computer and use it in GitHub Desktop.
Never struggle with editing your crontab again; put this in the beginning of each of your crontabs
# * * * * * command to execute
# ┬ ┬ ┬ ┬ ┬
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ └───── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names)
# │ │ │ └────────── month (1 - 12)
# │ │ └─────────────── day of month (1 - 31)
# │ └──────────────────── hour (0 - 23)
# └───────────────────────── min (0 - 59)
# Example: Backup all the hosted sites via shell scripts once per week on Sunday @ 5am
0 5 * * 0 /htdocs/_backups/_scripts/backup_all_sites.sh > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment