What is Timeout?
The maximum time allowed for a job execution before it is forcefully terminated.
Definition
A timeout is a safety limit on how long a job execution can run. If the job does not complete within this duration, the scheduler terminates it and marks the execution as timed out. Timeouts prevent runaway processes from consuming resources indefinitely. In CronJobPro, the HTTP request timeout determines how long to wait for a response from your endpoint before giving up.
Simple Analogy
Like a chess clock โ each player has a limited amount of time to make their move. If the clock runs out, the game is over regardless of the board position.
Why It Matters
Without timeouts, a hung job can consume resources forever, potentially blocking subsequent scheduled runs. A stuck HTTP request might hold a connection open indefinitely. Timeouts ensure that even when things go wrong, the system recovers and moves on to the next scheduled execution.
How to Verify
Check your job's timeout setting in CronJobPro โ it is configurable per job. Review execution history for timeout-status runs, which indicate your endpoint is responding too slowly. Compare average execution duration against the timeout to ensure adequate headroom.
Common Mistakes
Setting the timeout too short, causing legitimate slow operations to be killed prematurely. Setting it too long, allowing runaway jobs to consume resources for hours. Not differentiating between connect timeout (time to establish connection) and response timeout (time to receive full response).
Best Practices
Set the timeout to 2-3 times the expected maximum execution duration. Monitor timeout occurrences and investigate the root cause (slow queries, network issues, resource exhaustion). In CronJobPro, configure separate connect and response timeouts for precise control.
Documentation
Read the full docs
Try it free โFrequently Asked Questions
What is Timeout?
A timeout is a safety limit on how long a job execution can run. If the job does not complete within this duration, the scheduler terminates it and marks the execution as timed out. Timeouts prevent runaway processes from consuming resources indefinitely. In CronJobPro, the HTTP request timeout determines how long to wait for a response from your endpoint before giving up.
Why does Timeout matter for cron jobs?
Without timeouts, a hung job can consume resources forever, potentially blocking subsequent scheduled runs. A stuck HTTP request might hold a connection open indefinitely. Timeouts ensure that even when things go wrong, the system recovers and moves on to the next scheduled execution.
What are best practices for Timeout?
Set the timeout to 2-3 times the expected maximum execution duration. Monitor timeout occurrences and investigate the root cause (slow queries, network issues, resource exhaustion). In CronJobPro, configure separate connect and response timeouts for precise control.
Related Terms
Execution Duration
The measured wall-clock time from when a job starts running to when it finishes.
Response Timeout
The maximum time to wait for an HTTP response before considering the request failed.
Execution Status
The outcome classification of a job run: success, failure, timeout, or skipped.
Graceful Shutdown
A controlled process of completing in-progress work before stopping a service or job.