How do I get notified when a database value changes?
Run a scheduled query and curl Lert when it crosses your threshold. A cron job checks the value on a schedule; the moment it changes, one HTTP POST to your Lert link buzzes your phone. No account, no API keys, no SDK.
Most databases don't push events out on their own, so the reliable pattern is to poll: a small scheduled job runs a query every few minutes, compares the result to a threshold, and alerts you only when something actually changed. Lert is the alerting half of that — one curl and your phone buzzes. Because your Lert link is the credential, there's no key to configure and nothing to install.
Set it up in under 30 seconds
- Download the app. Open it once — there's no account to create. Your private link is on screen.
- Copy your link. One tap copies
https://lert.dev/p/your-id. - Add a curl to your scheduled query. After the SQL runs, POST to your link when the value crosses the line you care about.
From then on, a real change is the only thing that reaches your phone.
Example: a scheduled SQL check + curl
# run every 5 min via cron; alerts only when stock is low LOW=$(psql -tAc "SELECT count(*) FROM items WHERE qty < 5") if [ "$LOW" -gt 0 ]; then curl -X POST "https://lert.dev/p/your-id" \ -H "Content-Type: application/json" \ -d "{\"title\":\"Low stock ⚠️\",\"body\":\"$LOW items below threshold\",\"tag\":\"inventory\"}" fi
No auth token, no SDK — the whole alert is one curl. Schedule it with cron, a systemd timer, or your host's scheduler. Prefer Python? Swap the shell for the requests version.
Tip: store the last value you alerted on (in a file or a row) and only POST when it's different. That turns a noisy every-run poll into a clean "only when it actually changed" notification.
Related setups
- Get notified when an order comes in
- Send a notification from a bash script
- Send a notification from Python
- Get notified when you make a sale
See the database alert notifications use case and the webhook notifications guide. It's free for one channel and 50 notifications a day; Lert Pro is $2.99/month for unlimited. Full details in the docs.
Let your database tap you on the shoulder.
Download Lert, copy your link, add one curl to your scheduled query. Your phone buzzes on change.