Troubleshooting failed cron jobs
A scheduled HTTP request can fail for reasons on either side of the connection. The response status, the body and the time it took usually point to the cause within a few minutes.
Common causes
4xx response (client error)
The request reached your server but was rejected. Confirm the URL, HTTP method, and query parameters match the route your server expects. A 401 or 403 usually means a missing or expired token in the headers. A 404 usually means the path is wrong.
5xx response (server error)
Your endpoint crashed or returned an internal error. Open the run in the job logs, read the response body, and check your server logs at the same timestamp. Fix the endpoint first; the scheduler is working correctly when it reports a 5xx.
Response pattern did not match
A run only succeeds when the body contains the text you configured. If the job fails with a 200 status, compare the pattern with the exact text in a real response. Dynamic values such as timestamps or request IDs should not be part of the pattern.
Timeout
The endpoint did not respond in time. Long-running work should be moved out of the request: accept the request, return a 202 Accepted quickly, and process the work in a queue or background task.
Checklist before you change the schedule
Changing how often a job runs does not fix a broken endpoint. Work through these checks first.
- Open the failed run and read the status code and response body.
- Call the same URL with the same method, headers and query string from a terminal or the API tester.
- Confirm the expected status code and body pattern in the job settings still match the endpoint.
- Store secrets such as API tokens in headers, not in the URL, because URLs are stored in logs.
- Make the endpoint idempotent so a repeated run does not create duplicate records or charges.
- Use a webhook test URL to capture the exact request your job sends before pointing it at production.
Avoiding duplicate runs
Retries and overlapping schedules can call the same endpoint more than once. Design jobs so that repeating a request is safe: use an idempotency key, check whether the work already happened before doing it, and keep side effects such as emails or payments behind a single guarded step.
Related reading
If you are not sure the schedule itself is right, read the cron expression guide.