jump to navigation

Adding environment variables to cron via whenever November 24, 2009

Posted 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.

### schedule.rb
env ‘SHELL’, ‘/usr/bin/zsh’