ruby - Multiple schedule.rb files with whenever gem -


is possible have multiple schedule.rb files when using whenever gem in rails setup cron jobs? looking have regular schedule.rb file , reports_schedule.rb file going deployed different server , has own specific reports environment.

how whenever use schedule.rb file? possible?

it looks possible if bit ugly. looking @ source code on job_list.rb:25 whenever instance eval. can following.

schedule.rb

#load reporting schedules instance_eval(file.read('reporting_schedule.rb'), 'reporting_schedule.rb')  # regular jobs # ... 

reporting_schedule.rb

#need way know if on reporting server if `hostname` =~ /reporting_server/   # reporting jobs   # ... end 

worked me doing quick tests whenever command. have not tried using in deploy though.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -