Last active
December 25, 2015 10:19
-
-
Save amercier/6961063 to your computer and use it in GitHub Desktop.
root's crontab on MacOS X Moutain Lion. Contains auto-updates for npm and gem.
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
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/local/mysql/bin | |
L=/var/log/cron | |
0 * * * * ([-d $L]||mkdir $L) && (echo -n "$(date) Updating NPM... " && npm -g update > /dev/null 2>> $L/npm-error.log && echo OK || echo NOK) >> $L/npm.log | |
0 * * * * ([-d $L]||mkdir $L) && (echo -n "$(date) Updating Gems... " && gem update > /dev/null 2>> $L/gem-error.log && echo OK || echo NOK) >> $L/gem.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment