PushMon every day Schedule

When using the “every day” schedule, most people will think that they will get an alert as soon as a ping has been skipped. For example, say you have some cron job that runs every 3 AM:

Ping #1: 01/01/2013 3:00 AM GMT
Ping #2: 01/02/2013 3:00 AM GMT
Ping #3: 01/03/2013 3:00 AM GMT
# no ping #4, cron didn’t run or it didn’t complete successfully
# no ping #5, cron didn’t run or it didn’t complete successfully

People will naturally expect PushMon to send an alert soon after 01/04/2013 3:00 AM GMT, as that ping has been skipped. However, this is not how PushMon is designed. Here’s what happens behind the scenes.

1. “every day” schedules are checked once a day, at midnight GMT. This is for performance reasons, so checks are batched. This also removes any ambiguity, as PushMon doesn’t really know when the ping should occur, just that it should happen on a daily basis.

2. “every day” schedules check if a ping occurred within the last 24 hours. This is how all schedules work. For example, if you use “every hour”, PushMon checks if the ping occurred within the last hour.

So back to our example, we check on 01/04/2013 12:00 AM GMT if a ping occurred. We see the ping 01/03/2013 3:00 AM GMT, which is within 24 hours, so PushMon thinks all is good, and does not send an alert. We wait another day and check again on 01/04/2013 12:00 AM GMT and now notice the last ping is no longer within 24 hours, and now sends an alert.

Although this is how PushMon is designed, for many cases, this alert is a day too late. So what to do? Use the “by Time” feature. If you explicitly tell PushMon what time you expect the cron jobs to finish, PushMon can better handle the alerts. So in our example, the correct schedule is:

by 3:30 AM every day

PushMon will alert you if the cron job hasn’t finished by 3:30 AM. We added a 30 minute grace period in case the job runs longer than expected.

So to summarize, if you are using the “every day” schedule and feel you are getting the alerts too late, try explicitly telling PushMon what time you expect your jobs to complete, using our “by Time” feature.