-
-
Notifications
You must be signed in to change notification settings - Fork 189
Cron
Postmodern edited this page Oct 21, 2013
·
5 revisions
chruby can be used to switch Rubies for specific cron jobs.
Note: chruby-exec
must be accessible via PATH
, SHELL
must be set and chruby must be loaded by the shell.
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
MAILTO=root
30 18 * * * chruby-exec 1.9.3 -- /path/to/script
You can also use chruby in user-specific crontabs:
SHELL=/bin/bash
HOME=/home/deploy
PATH=/bin:/usr/bin:/usr/local/bin
30 18 * * * chruby-exec 1.9.3 -- /path/to/script