How do I get notified when a long-running script finishes?
POST to your Lert link at the end of the script. Add the elapsed time to the body and your iPhone buzzes the moment it's done — in about a second. No account, no API keys, no SDK. Setup takes under 30 seconds.
Some jobs take twenty minutes, some take three hours — data processing, migrations, big test suites, exports. Checking back every few minutes breaks your focus and you still end up losing time. The clean answer is to let the script tell your phone when it's finished. Lert turns that into a single line: your unique link is the credential, so there's no auth and nothing to install.
Set it up in under 30 seconds
- Download the app. Open it once — there's no account to create.
- Copy your link. A private link like
https://lert.dev/p/your-idis on screen; one tap copies it. - POST at the end of the script. Include how long it took so the buzz tells you everything at a glance.
Kick it off, go do something else, and your phone buzzes when it's done — even locked in your pocket.
The code
import time, requests start = time.time() run_long_job() # your slow work mins = round((time.time() - start) / 60, 1) requests.post("https://lert.dev/p/your-id", json={ "title": "Job finished", "body": f"Done in {mins} min" })
No headers beyond JSON, no auth token, no SDK. The same idea works from bash — just capture the start time and append a curl at the end. Not a coder? Tell your AI: "POST to my Lert link when this finishes."
Guard against crashes: wrap the work in try/finally so you get a buzz even if the job errors out. A "finished" ping is most useful precisely when the long run didn't go to plan.
Related things people wire up
- When a Python script finishes
- When ML training finishes
- When a scraper finishes
- Long-script notifications
- Full Python push guide
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.