Get emailed when a scheduled task fails

schedules, alerts, failure email, missed runs, notifications, cron · 0 found this helpful

A schedule can email you when something goes wrong, so a broken task doesn't go unnoticed for days. This article covers which alerts there are, how to turn them on, and what the emails contain.

Which alerts your plan has

Alert Essential Business Pro
Email me when it fails Yes Yes Yes
Email me when it recovers Yes Yes Yes
Email me about missed runs No Yes Yes
Email me about slow runs No No Yes

Turn on alerts

  1. Open Account → Hosting → your site → Schedules.
  2. Click Edit on the schedule.
  3. Open Alerts.
  4. Turn on Email me when it fails.
  5. Set After to how many failures in a row it takes before we email. Start with 1. Use 2 or 3 for a task that sometimes fails once and then works, such as one that calls another company's service.
  6. Turn on Email me when it recovers to hear when it works again.
  7. On Business and Pro, turn on Email me about missed runs. On Pro, you can also turn on Email me about slow runs.
  8. Click Save schedule.
The Alerts part of the schedule form, emailing after 2 failures in a row

When each alert is sent

Alert Sent when
Failure The schedule fails the number of times in a row you set under After. A failure is any result other than Worked, Skipped, Stopped or Missed
Recovery It works again after a failure email
Missed runs A run was due but didn't happen, because the scheduler was stopped
Slow runs A run takes more than twice as long as the schedule usually does

We email the address on your Barbrick account. If a schedule keeps failing, we email again at most once a day, so a broken task won't flood your inbox. Retries count as one failure, so a run that fails and then works on a retry doesn't send an email.

Your scheduler reports results to us every 5 minutes, so a failure email usually arrives within 5 minutes of the run.

What the email contains

  • the schedule's name and the site it belongs to
  • the result, such as Failed or Timed out
  • when it was due
  • a link to the run in your history, where you can read its output

The email never contains your command, its output, your environment variables or anything that could run in your mail app.

If the scheduler itself stops

The scheduler in your account checks in with us every few minutes. If it stops checking in, we're alerted and restart it, so you don't need an alert for that. Runs missed while it was stopped show in your history as Missed, and Email me about missed runs tells you about them on Business and Pro.

If something goes wrong

Problem Fix
No email after a failure Check After. With 3, it takes 3 failures in a row. Check your spam folder for mail from barbrick.ca
Too many emails Raise After, or fix the task. Repeat emails for the same schedule are limited to one a day
Emails go to the wrong address Alerts go to your Barbrick account's email. Change it in your account details
No missed-run emails Missed-run alerts are on Business and Pro. On Essential, missed runs still show in history

Was this helpful?

Still stuck? Ask us and we'll walk you through it.