My config/schedule.rb file looks like this:
LOG_FILE = File.expand_path("#{__FILE__}/../../log/Scripts.log")
set :environment_variable, 'BACKEND_ENV'
set :environment, :production_backend
set :output, LOG_FILE
every 1.day, :at => '1:00 am' do
rake "my_task"
end
When I run whenever, output
and environment
are set correctly, but environment_variable
still defaults to RAILS_ENV:
me@my_box:~$ whenever
0 1 * * * /bin/bash -l -c 'cd /home/me && RAILS_ENV=staging bundle exec rake my_task --silent >> /home/me/log/Scripts.log 2>&1'
## [message] Above is your schedule file converted to cron syntax; your crontab file was not updated.
The documentation is pretty clear...what am I doing wrong?