You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run whenever and do a --set environment=development
When I do a 'crontab -l', it shows the job, using RAILS_ENV=development as the correct environment... However, when I do a 'whenever' by itself, it incorrectly shows the job will run with RAILS_ENV=production. Upon testing, the job correctly runs under development as 'crontab -l' indicates. So there must be some error when 'whenever' is reading the crontab. See terminal output below
>> whenever --update-crontab nmalirt --set environment=development
[write] crontab file updated
>> crontab -l
# m h dom mon dow command
# Begin Whenever generated tasks for: nmalirt
PATH=/opt/local/bin:/opt/local/sbin:/Users/istrascina/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/Users/istrascina/bin:/usr/local/mysql/bin
0 8 20 * * cd /Users/istrascina/dev/rails/nmalirt && RAILS_ENV=development /usr/bin/env rake mail:reminders
# End Whenever generated tasks for: nmalirt
>> whenever
PATH=/opt/local/bin:/opt/local/sbin:/Users/istrascina/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/Users/istrascina/bin:/usr/local/mysql/bin
0 8 20 * * cd /Users/istrascina/dev/rails/nmalirt && RAILS_ENV=production /usr/bin/env rake mail:reminders
The text was updated successfully, but these errors were encountered:
By default, whenever sets your environment to production. You can change this by doing "set :environment, 'whatever'" in you schedule.rb file or by using the --set option like you're doing.
Since you're running whenever with no options, the environment is defaulting to production.
Running whenever with no options just shows you the output of your schedule.rb converted to cron syntax. It's not the same as running 'crontab -l'. I need to add some output to make that more clear -- sorry for the confusion.
I run whenever and do a --set environment=development
When I do a 'crontab -l', it shows the job, using RAILS_ENV=development as the correct environment... However, when I do a 'whenever' by itself, it incorrectly shows the job will run with RAILS_ENV=production. Upon testing, the job correctly runs under development as 'crontab -l' indicates. So there must be some error when 'whenever' is reading the crontab. See terminal output below
The text was updated successfully, but these errors were encountered: