Job Timeout
Introduction
GoCD can be configured to automatically cancel jobs that do not generate any console output for a period of time. Default Job timeout options include:
- Never : Jobs will never be timed out by default. You can override this behavior when configuring the job in the job editor
- Timeout after a period of inactivity : A job will be cancelled if:
- it did not have any console output for a period of time (in minutes)
- it was not assigned an agent
When a job is timed out, the onCancel task for the job will be triggered.
Configuration
Specify default job timeout at the server level
You must be logged in as an admin user to configure this step.
- Navigate to the Admin section on the GoCD dashboard.
- Navigate to Server configuration
- Navigate to the ‘Job Timeout Management’ sub-section
- Enter the default timeout for a job.
Configure timeout behavior for a job
You must be logged in as an admin user to configure this step.
You can configure timeouts for each job if the timeout behavior needs to be different from the default timeout.
- Navigate to the Admin section on the GoCD dashboard.
- Navigate to the job settings page for the job.
- Choose the desired timeout behavior. You can choose to never timeout the job, provide a specific value or use the default job timeout.