Whenever cron errors

Whenever schedules that define certain path specific actions may have errors in your cron output similar to /bin/bash bundle command not found

Problem

The whenever schedules cause schedules to execute within a crontab context, however the context doesn’t have access to the full PATH. You may see output from your cron jobs that looks similar to:

/bin/bash: bundle: command not found

Resolution

Simply add the following line to the top of your config/schedule.rb file (then commit it, push it and redeploy your stack):

env :PATH, ENV['PATH']

 

You must be logged in to comment on this article