Created
November 18, 2013 20:43
-
-
Save Danack/7534959 to your computer and use it in GitHub Desktop.
Crontab setup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#m: minute of the day, from 0 to 59 | |
#h: hour of the day, from 0 to 23 | |
#dom: day of month, from 1 to 31 | |
#Month | |
#dow: day of week, from 1 to 7 | |
#user: user your cron job should run as | |
#command: command or script that should run | |
echo "MAILTO=\"[email protected]\"" | crontab -u intahwebz - | |
directory="/home/intahwebz/current/tools/amazon/" | |
command="cd $directory && sh backupSQLToS3.sh" | |
job="15 1 */2 * * $command" | |
cat <(fgrep -i -v "$command" <(crontab -u intahwebz -l)) <(echo "$job") | crontab -u intahwebz - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment