Timeouts
Limit how long a task can run for before it is automatically cancelled.
Task timeouts allow you to limit the amount of time that a task will run before it is automatically
cancelled. This can be useful to prevent "run-away" tasks from consuming excessive resources.
By default, all standard-runtime tasks time out after 1 hour, but this can be
extended up to a maximum of 12 hours. The workflow runtime allows runs to
execute for much longer—up to 60 days—but it does not yet support configuring a lower timeout.
Manual cancellation
Manual cancellation
In addition to timeouts, runs can be explicitly cancelled to stop it from completing:

Cancellation behavior
Cancellation behavior
When a run times out or is manually cancelled, it will be issued a
SIGTERM
and given 10 seconds to
gracefully shut down. If the run has not yet exited after 10 seconds, then the run will be sent a
SIGKILL
.
An example run that has been cancelled.
Tasks can gracefully handle cancellation by listening for
SIGTERM
signals and performing any
relevant cleanup before exiting on their own.In the case where a run is cancelled before it is started, the run will be immediately marked as
cancelled and the behavior above will not apply.
Timeout configuration
Timeout configuration
Timeouts are represented in seconds since a task was started.
typescriptCopied1export default airplane.task(2{3slug: "my_task",4timeout: 600,5},6async () => {...}7);
pythonCopied1@airplane.task(2timeout=60,3)4def my_task():5pass
In your task definition file (the file with extension
.task.yaml
), add:yamlCopied1timeout: 600
A timeout can be configured in the "Advanced" section when creating or editing a task:
