3

I'm using whenever to generate the cronjobs for my Rails application. Rails 4.2.1

In the schedule.rb I have something like that:

every 13.minutes do
   rake "crons:dosomething"
end

This generates a cronjoblike this:

 RAILS_ENV=production bundle exec rake crons:dosomething

Problem is that this one only runs cronjobs for production environment ... but I need the cronjob as well in test and development

I tried this:

every 13.minutes do
   rake "crons:dosomething", :environment => :development
   rake "crons:dosomething", :environment => :test
   rake "crons:dosomething", :environment => :production
end

problem here is that the second rake runs before the first one is completely finished is there any solution for this problem?

Felix
  • 5,452
  • 12
  • 68
  • 163
  • 1
    Does this help? http://stackoverflow.com/questions/11514968/rails-using-whenever-gem-in-development – Curtis May 30 '15 at 21:54

0 Answers0