Get started

Bring in your work

Monitor existing work

Keep your existing cron job, systemd timer, or CI schedule. Have it report its result to Oh My Job over HTTP. No agent or enrolled machine is required for this path.

This guide describes the current development app. Monitoring is newer than the documented 0.1.1 release; confirm your server includes monitored jobs before following these steps.

Create a monitored job

Open Jobs → New Job and choose the option for work that runs elsewhere and reports back. Give it a name, set the schedule and timezone to match the existing work, then choose Report within.

That window is how long Oh My Job should wait after an expected occurrence for a report to arrive. Leave enough time for the work to finish and for ordinary delays.

Save the job and copy its ping URL. The URL contains a secret token; anyone who has it can send reports for the job.

Report success or failure

Add a request after your existing command, using the ping URL from the job page:

./backup.sh
curl -fsS -m 10 --retry 5 -o /dev/null "https://jobs.example/ping/TOKEN/$?"

Replace the example URL with your actual ping URL. The shell expands $? to the preceding command’s exit code: 0 reports success, and a nonzero code reports failure.

Keep the request directly after the command. An intervening command changes $?. If your script enables set -e, explicitly capture failures so it does not exit before sending the report:

status=0
./backup.sh || status=$?
curl -fsS -m 10 --retry 5 -o /dev/null "https://jobs.example/ping/TOKEN/$status"
exit "$status"

Measure how long it takes

Send a start signal before the command and its result afterwards:

curl -fsS -m 10 --retry 5 -o /dev/null "https://jobs.example/ping/TOKEN/start"
status=0
./backup.sh || status=$?
curl -fsS -m 10 --retry 5 -o /dev/null "https://jobs.example/ping/TOKEN/$status"
exit "$status"

A start signal opens a run so the completion can record its duration. Completion-only pings also work.

Understand missing reports

Monitoring begins only after the first report arrives. Once it is active, after the expected report window ends without a completion, Oh My Job records a Missed run. That is different from a command reporting a failure: no result arrived in time.

A newly created monitored job shows that it is awaiting its first report. Send an initial report and confirm that it appears in run history before relying on the integration.

The current application surfaces failures and missing work in its interface. Email and webhook notification delivery is planned, not available in the version shown on this site.

Attach output

A POST body can carry output to keep alongside the run. Do not send secrets in it. See the ping API reference for endpoints and response behavior.

Something unclear? Open an issue