This is the contents of my crontab file:
0 0,6,12,18 * * * cd /var/www/app/current && backup perform --trigger db_backup --config_file config/backup.rb --data-path db --log-path log --tmp-path tmp >> /var/www/app/current/log/cron.log 2>&1
0 3 * * * cd /var/www/app/current && RAILS_ENV=production bundle exec rake runs:populate --silent >> /var/www/app/current/log/cron.log 2>&1
59 23 * * * cd /var/www/app/current && RAILS_ENV=production bundle exec rake runs:log --silent >> /var/www/app/current/log/cron.log 2>&1
If I run any of these manually as the owner of the crontab they work fine, but the cron.log
file simply contains:
/bin/sh: bundle: not found
/bin/sh: backup: not found
/bin/sh: bundle: not found
I tried wrapping each one in the following (as default by the whenever gem which I'm using to manage my cron file) bash -l -c '...'
but then I get the same as above except for bash bash: bundle: command not found