Skip to content

Instantly share code, notes, and snippets.

@andyreagan
Created March 25, 2015 19:13
Show Gist options
  • Save andyreagan/0467452b698a4002f51a to your computer and use it in GitHub Desktop.
Save andyreagan/0467452b698a4002f51a to your computer and use it in GitHub Desktop.
backup crontab to a file!
# make a file, call it backupcron.cron
# make sure it's executable (chmod +x backupcron.cron)
# put just this line in it
crontab -l > /users/a/r/areagan/crontab.out
# then add this line to the crontab itself (via crontab -e)
0 * * * * /users/a/r/areagan/backupcron.cron
# phew, take a sign of relief, your crontab is now saved in a file
@andyreagan
Copy link
Author

of course, change the directory!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment