What’s a Heartbeat and why you need it
A Heartbeat is like a “pulse” signal your server sends to erty at regular intervals.
If the signal stops… it means something’s wrong (and we’ll let you know right away).
In short, it helps you:
- Monitor cronjobs or scheduled scripts.
- Know if they’ve stalled or stopped running.
- Avoid nasty surprises, like stuck processes nobody noticed.
💡 What’s a cronjob?
It’s an automated task your server runs at specific times (for example: “update the database every hour” or “send the report every night”). Heartbeat checks that these tasks are actually running as expected.
How to create a new Heartbeat
- Go to the Heartbeats section from the left menu.
- Click Create heartbeat.
- Fill in the main fields:
- Name: the monitor name (e.g. “Nightly backup”).
- Expect a heartbeat every: how often you expect the signal (you can choose seconds, minutes, hours, or days).
- Grace period: a tolerance margin before triggering the alert (e.g. if your cronjob runs every hour, you might allow 5 minutes of grace).
- Notifications: choose how you want to get alerts (email, Slack, SMS, etc.). (Each customer will only see the channels they’ve set up — we’ll have a dedicated guide for this)
- Advanced settings (extra options):
- Email reports: enable this to receive periodic uptime reports for your Heartbeat via email.
- Project: assign the Heartbeat to a project to keep your monitors organized.
- Click Create.
How it works (and linking it to your cronjob)
Once it’s created:
- erty will give you a unique link (something like https://app.erty.pro/webhook-heartbeat/your-unique-id).
- In your cronjob, just add a command to send a GET or POST request to that link every time the job runs.
- If erty doesn’t receive the signal within the set time + the grace period, an alert will be triggered.
💡 Example with cURL in a cronjob
* * * * * curl -m 10 -s https://app.erty.pro/webhook-heartbeat/your-unique-id > /dev/null 2>&1
This sends a “pulse” to erty every minute.
Pro tips
- Set a realistic grace period: too short = false alarms, too long = delayed alerts.
- Use projects to organize your monitors if you have many.
- Want to know more about notification options? Check our dedicated erty Notifications guide (link coming soon).