UPDATED 6/7/2013 – We no longer recommend using bash -l -c to run Cron jobs with RVM. See our updated approach . This info is for Scout users, but it’s also applicable to anyone who’s wondered how to use cron together with RVM. This assumes 1) you are using bash; 2) you running you cron tasks as a non-root user (say, “deploy”). To use an RVM Ruby from cron, invoke your own bash session, like so:
![RVM and cron in production | Scout APM Blog](https://cdn-ak-scissors.b.st-hatena.com/image/square/1f77242396426bc2b9a6decd2cb00ade50af0842/height=288;version=1;width=512/https%3A%2F%2Fassets.scoutapm.com%2Fassets%2Fscout_apm-80cb3033ec7a799bffffd677158338bfd445efd989380fa219f3c02fb9fdf90f.png)