Adding environment variables to cron via whenever November 24, 2009Posted by John Dewey in Crontab, Plugins & Gems.
I wanted my users’ cron to run under zsh, so it picks up the .zshenv — which contains additional environment variables, my rake task required.
Can add the following to schedule.rb. This will work with any ENVIRONMENT=variable.
env ‘SHELL’, ‘/usr/bin/zsh’