Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 188
Cron
Postmodern edited this page Oct 21, 2013 · 5 revisions
chruby can be used to switch Rubies for specific cron jobs.
Note:chruby-execmust be accessible via PATH, SHELLmust 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