Skip to content

Instantly share code, notes, and snippets.

@marvin-marvin
Last active June 24, 2019 11:27
Show Gist options
  • Save marvin-marvin/9ba7c7558318eb4991e835f9382fc4b1 to your computer and use it in GitHub Desktop.
Save marvin-marvin/9ba7c7558318eb4991e835f9382fc4b1 to your computer and use it in GitHub Desktop.
github backup crontab
# make sure crontab is used
@reboot /usr/bin/crontab /etc/cron.d/crontab
#*/15 * * * * /usr/bin/crontab /etc/cron.d/crontab
# ENV
SHELL=/bin/bash
# min,hour,dayOfMonth,month,dayOfWeek
00 02 * * * cd /root/github-backup && mkdir `date +\%F` && cd `date +\%F` && /workdir/github-backup.sh
# An empty line is required at the end of this file for a valid cron file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment