What can be reported
Besides "it ran", a script can send numbers. TaskBeacon compares them with rules you can change on the job page (Alert me when).
When it ends and when it starts
The ping when it ends is always in the code from the Code tab: it tells TaskBeacon the job ran, and without it in time the job counts as Missed.
The ping when it starts (/start) is on by default: it measures how long each run takes and turns a run that hangs into Late.
Untick it on the Code tab if you only want the end.
Number of rows
?rows=15234. The first time a job sends rows, it gets two rules: alert when rows drop more than 40% below the recent average, or are below 1. A job that sends no numbers has no rules.
Latest date
?last_date=2026-11-05, the newest date in your data. On the job page, under Alert me when, add a rule: name last_date, Is a date older than X days. An older date sends an Odd data alert.
Backup size
?bytes=…, the size of a backup file. Alerts when it is empty or much smaller than usual. Ping after the copy, not after the dump.
Your own number
Any name and value, for example ?total_sales=81234.5. Add a rule for it on the job page, under Alert me when: its name, Is below X, Is above X or Drops more than X%, and X.
Exit code
Put the exit code at the end of the address: /ping/<id>/0 is a finished run, any other number
(/ping/<id>/1) a failure with that exit code, the same as /fail?exit_code=1. A shell can send
it as it is, without an if:
/path/to/your-job.sh
curl -fsS -m 10 "https://taskbeacon.io/ping/<id>/$?"
The PowerShell, Batch and cron code on the Code tab works this way: /$code, /%TB_RC% and /$?.
Words in the output
Some programs end with exit code 0 even when they printed an error. Send the output (or its last lines) as the body of the
finishing ping, and add an output rule on the job page, under Alert me when: pick
Fail if the output contains or OK only if the output contains and type the words in X, comma separated, for example
ERROR, Traceback. Case does not matter.
- Fail if the output contains: a run whose output has any of the words counts as Failed, with the reason Output contains 'ERROR'.
- OK only if the output contains: a run whose output has none of the words counts as Failed (also when it sent no output).
/path/to/your-job.sh > job.log 2>&1
tail -n 20 job.log | curl -fsS -m 10 --data-binary @- "https://taskbeacon.io/ping/<id>/$?"
The rules check the finishing ping (the plain address, or exit code 0): its text body, a log field in a JSON body
or ?log=. A /fail is a failure anyway. The PowerShell and Batch code on the Code tab sends its last lines only with a failure, so for an output rule send the output with the finishing ping yourself, as above.
On the Code tab, tick what to report and the code changes with it. TaskBeacon receives only what the lines send: these numbers and, on a failure, the last 20 lines of output (or the error message). Untick Send output lines to send only the error message or exit code (see Privacy). Your data itself stays on your machine.
Use cases: Get an alert when a Stata do-file fails in batch mode · Task Scheduler Last Run Result 0x0, but the script failed · PowerShell script errors and the exit code in Task Scheduler · Know when a scheduled R script fails · Get an alert when a SAS batch job ends with errors · Monitor a scheduled AI agent or LLM job · Ask Claude or ChatGPT what failed last night · Get an alert when an AI job returns an empty or too-short answer · Get an alert when a job loads 0 rows, or far fewer than usual · Check that a daily table or file is fresh · Check that last night's backup exists and isn't empty. More questions: FAQ.