ruby - Rails: Testing Cron Jobs in development environment -
i have custom environment called 'reports' setup hit slave database. trying configure cron jobs using whenever gem , want test them in development before deploy. there way test cron jobs in development? there anyway schedule them locally , start reports server , see if run? thank you!
i start off reviewing how gem (whenever gem) conducting tests. extract 1 of their functional test:
context "weekday @ (single) given time" setup @output = whenever.cron \ <<-file set :job_template, nil every "weekday", :at => '5:02am' command "blahblah" end file end should "output command using time" assert_match '2 5 * * 1-5 blahblah', @output end end
Comments
Post a Comment