File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,16 +165,28 @@ export type TriggerConfig = {
165165 */
166166 logLevel ?: LogLevel ;
167167
168+ /**
169+ * The maximum duration in compute-time **seconds** that a task run is allowed to run. If the task run exceeds this duration, it will be stopped.
170+ *
171+ * Minimum value is 5 seconds.
172+ *
173+ * Setting this value will affect all tasks in the project. You can override it on a per-task basis.
174+ *
175+ * @see https://trigger.dev/docs/tasks/overview#maxcomputeseconds-option
176+ */
177+ maxComputeSeconds ?: number ;
178+
168179 /**
169180 * The maximum duration in compute-time seconds that a task run is allowed to run. If the task run exceeds this duration, it will be stopped.
170181 *
171182 * Minimum value is 5 seconds
172183 *
173184 * Setting this value will effect all tasks in the project.
174185 *
186+ * @deprecated Use `maxComputeSeconds` instead — same semantics, clearer unit. If both are set, `maxComputeSeconds` wins.
175187 * @see https://trigger.dev/docs/tasks/overview#maxduration-option
176188 */
177- maxDuration : number ;
189+ maxDuration ? : number ;
178190
179191 /**
180192 * Set a default time-to-live (TTL) for all task runs in the project. If a run is not executed within this time, it will be removed from the queue and never execute.
Original file line number Diff line number Diff line change @@ -271,10 +271,19 @@ type CommonTaskOptions<
271271 }
272272 | MachinePresetName ;
273273
274+ /**
275+ * The maximum duration in compute-time **seconds** that a task run is allowed to run. If the task run exceeds this duration, it will be stopped.
276+ *
277+ * Minimum value is 5 seconds.
278+ */
279+ maxComputeSeconds ?: number ;
280+
274281 /**
275282 * The maximum duration in compute-time seconds that a task run is allowed to run. If the task run exceeds this duration, it will be stopped.
276283 *
277284 * Minimum value is 5 seconds
285+ *
286+ * @deprecated Use `maxComputeSeconds` instead — same semantics, clearer unit. If both are set, `maxComputeSeconds` wins.
278287 */
279288 maxDuration ?: number ;
280289
@@ -876,12 +885,23 @@ export type TriggerOptions = {
876885 */
877886 metadata ?: Record < string , SerializableJson > ;
878887
888+ /**
889+ * The maximum duration in compute-time **seconds** that a task run is allowed to run. If the task run exceeds this duration, it will be stopped.
890+ *
891+ * This will override the task's `maxComputeSeconds` (or the legacy `maxDuration`).
892+ *
893+ * Minimum value is 5 seconds.
894+ */
895+ maxComputeSeconds ?: number ;
896+
879897 /**
880898 * The maximum duration in compute-time seconds that a task run is allowed to run. If the task run exceeds this duration, it will be stopped.
881899 *
882900 * This will override the task's maxDuration.
883901 *
884902 * Minimum value is 5 seconds
903+ *
904+ * @deprecated Use `maxComputeSeconds` instead — same semantics, clearer unit. If both are set, `maxComputeSeconds` wins.
885905 */
886906 maxDuration ?: number ;
887907
You can’t perform that action at this time.
0 commit comments