I like this! I wish there was a way to authenticate though. So, as you can gauge in deeper and check if services are really working. But of course, if the file is public, that throws spanner in the plans.
Feature: Jobs should run on time
Scenario: Search Subscription Job ran on time
Given the job started and ended at:
| start | end |
| 2011-10-30 05:30:01 GMT | 2011-10-30 05:37:42 GMT |
| 2011-10-29 05:30:01 GMT | 2011-10-29 05:37:42 GMT |
Then I should see the job took less than 10 minutes
And I should see the job started every day at "05:30 GMT"
The rails plugin generates the text above and start/end run times with something like this: class SearchSubscriptionJob
def perform
# Fire off the search subscription emails
...
end
add_job_monitor :job_method => :perform,
:should_run => [:daily, "05:30 GMT"],
:max_duration => 10.minutes,
:alerts => {:email => 'admin@yoursite.tld',
:sms => '+441234567890',
:twitter => 'twitteruser'}