Skip to content

Ping URLs (no API key)

Each cron schedule in Crontinel has a ping URL. The token in the URL is the credential, so the job needs no API key and no JSON. Find the URL on the app’s Cron schedules page, next to each schedule. Only members who can configure the app see it.

A ping goes through the same path as a JSON receipt. Schedule checks, outcome rules, AI quality checks, alerts, and the monthly ingest allowance all work the same way.

Endpoints

GET and POST both work.

URLRecords
https://app.crontinel.com/ping/<token>A completed run
https://app.crontinel.com/ping/<token>/startA running run
https://app.crontinel.com/ping/<token>/failA failed run
https://app.crontinel.com/ping/<token>/<exit_code>Completed for 0, failed for anything else. The exit code is stored.

A successful ping returns 200 with the body OK.

Examples

Terminal window
# Finished
curl -fsS -m 10 --retry 3 https://app.crontinel.com/ping/<token>
# Failed
curl -fsS -m 10 --retry 3 https://app.crontinel.com/ping/<token>/fail
# Report the job's exit code
./backup.sh
curl -fsS -m 10 --retry 3 https://app.crontinel.com/ping/<token>/$?
# Send the job's output (first 10,000 characters are kept)
./backup.sh > /tmp/backup.log 2>&1
curl -fsS -m 10 --retry 3 --data-binary @/tmp/backup.log https://app.crontinel.com/ping/<token>/$?

In a crontab line:

Terminal window
0 2 * * * /opt/jobs/backup.sh && curl -fsS -m 10 --retry 3 https://app.crontinel.com/ping/<token>

Start and finish

Ping /start when the job begins to get an alert for a run that starts and never finishes within the schedule’s maximum runtime.

Terminal window
RID="$(date -u +%Y%m%dT%H%M%SZ)"
curl -fsS -m 10 --retry 3 "https://app.crontinel.com/ping/<token>/start?rid=$RID"
./backup.sh
curl -fsS -m 10 --retry 3 "https://app.crontinel.com/ping/<token>/$??rid=$RID"
  • rid (run id) pairs the start with the finish. Use 1 to 64 letters, digits, ., -, _ or :. Pass it in the query string.
  • Without rid, a finish closes the latest open run that this URL started. That works when runs of the job never overlap.
  • Repeating a finish for a run that already finished returns OK and changes nothing, so --retry is safe.
  • The run’s duration is the time between the start and finish pings.

Errors

StatusMeaning
404Unknown or regenerated token. The body is Not found, with no other details.
422Invalid rid
429Too many pings: 60 per minute per URL. Or the organization used its monthly ingest allowance; that response is the same JSON as the ingest API.

Regenerate the URL

If a URL leaks, click Regenerate ping URL on the schedule. The old URL stops working at once and returns 404. The change is recorded in the audit log.

Outcome rules with pings

A ping carries no outcomes metrics. If an outcome rule applies to the job, its runs will show the outcome as unknown. Use a JSON receipt when the job needs to report numbers such as processed_records.