Skip to content

Use cases

Get alerted when a cron job fails

A cron job that fails silently is worse than no cron job at all. You think the work is happening, and it isn't. Cronhost watches every run and tells you the moment one fails.

The problem

Most schedulers run your job and move on. If the request errors out, times out, or the server is down, you find out later, usually when something downstream breaks. You want to know as it happens.

How to set it up

  1. 1

    Create the schedule

    Point a schedule at the endpoint you want to run and set its cron expression and timezone. Cronhost fires the request on time and records the status code, response, and timing of every run.

  2. 2

    Add a notification channel

    Under Notifications, add a channel for where you want alerts: email, Slack, Discord, or Telegram. Verify it once so Cronhost knows it can reach you. A channel is reusable across as many schedules as you like.

  3. 3

    Turn on failure alerts for the schedule

    Open the schedule's notification settings, set it to notify on failure, and attach the channel. From then on, if a run fails after exhausting its retries, that channel gets an alert with the schedule name and outcome.

  4. 4

    Get the all-clear when it recovers

    When a previously failing schedule succeeds again, Cronhost sends a recovery notice, so you are not left wondering whether the problem fixed itself. No need to keep checking the dashboard.

Example cadence: Run a cron job every 5 minutes

Never wonder if your cron job ran

Create a schedule, add a channel, and get alerted the moment something fails.

Frequently asked questions