Home/Answers/Notification from a cron job
Answer

How do I get a notification on my phone from a cron job?

End your crontab command with a curl POST to your Lert link. When the job runs, your iPhone buzzes in about a second. No account, no API keys, no SDK. Setup takes under 30 seconds.

Cron runs your jobs quietly in the background, which is great until you want to know one actually ran. Email digests get buried and log files need checking. The simplest fix is to have the job ping your phone directly. Lert makes that a curl one-liner you append to the crontab entry — no account, no key, nothing to install on the box.

Set it up in under 30 seconds

  1. Download the app. Open it once — there's no account to create.
  2. Copy your link. A private link like https://lert.dev/p/your-id is on screen; one tap copies it.
  3. Append a curl to your crontab line. Chain it after your command so it fires when the job finishes.

Save the crontab and the next scheduled run buzzes your phone — even locked in your pocket.

The code

crontab -e
# run the backup at 3am, then buzz my phone when it's done
0 3 * * * /home/me/backup.sh && \
  curl -X POST "https://lert.dev/p/your-id" \
    -H "Content-Type: application/json" \
    -d '{"title":"Nightly job done","body":"backup.sh finished at 3am"}'

No headers beyond content type, no auth token, no SDK. Use && to fire only on success, or ; to fire either way. For a longer script it's cleaner to put the curl at the end of the script itself.

Want to know about failures too? Add a second curl after || with a "job failed" body. Now a green buzz means success and a different message means something broke — no log-diving required.

Related things people wire up

It's free for one channel and 50 notifications a day; Lert Pro is $2.99/month for unlimited. See the docs for the full API.

Send your first one in 30 seconds.

Download Lert, copy your link, POST to it. Your iPhone buzzes.

Get the app iOS