Skip to content

Commit f4c62c3

Browse files
committed
Updated templates
1 parent 6a24aeb commit f4c62c3

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

packages/cli-v3/templates/examples/schedule.mjs.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ export const firstScheduledTask = schedules.task({
44
id: "first-scheduled-task",
55
// Every hour
66
cron: "0 * * * *",
7-
// Set an optional maxDuration to prevent tasks from running indefinitely
8-
maxDuration: 300, // Stop executing after 300 secs (5 mins) of compute
7+
// Set an optional maxComputeSeconds to prevent tasks from running indefinitely
8+
maxComputeSeconds: 300, // Stop executing after 300 secs (5 mins) of compute
99
run: async (payload, { ctx }) => {
1010
// The payload contains the last run timestamp that you can use to check if this is the first run
1111
// And calculate the time since the last run

packages/cli-v3/templates/examples/schedule.ts.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ export const firstScheduledTask = schedules.task({
44
id: "first-scheduled-task",
55
// Every hour
66
cron: "0 * * * *",
7-
// Set an optional maxDuration to prevent tasks from running indefinitely
8-
maxDuration: 300, // Stop executing after 300 secs (5 mins) of compute
7+
// Set an optional maxComputeSeconds to prevent tasks from running indefinitely
8+
maxComputeSeconds: 300, // Stop executing after 300 secs (5 mins) of compute
99
run: async (payload, { ctx }) => {
1010
// The payload contains the last run timestamp that you can use to check if this is the first run
1111
// And calculate the time since the last run

packages/cli-v3/templates/examples/simple.mjs.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { logger, task, wait } from "@trigger.dev/sdk/v3";
22

33
export const helloWorldTask = task({
44
id: "hello-world",
5-
// Set an optional maxDuration to prevent tasks from running indefinitely
6-
maxDuration: 300, // Stop executing after 300 secs (5 mins) of compute
5+
// Set an optional maxComputeSeconds to prevent tasks from running indefinitely
6+
maxComputeSeconds: 300, // Stop executing after 300 secs (5 mins) of compute
77
run: async (payload, { ctx }) => {
88
logger.log("Hello, world!", { payload, ctx });
99

packages/cli-v3/templates/examples/simple.ts.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { logger, task, wait } from "@trigger.dev/sdk/v3";
22

33
export const helloWorldTask = task({
44
id: "hello-world",
5-
// Set an optional maxDuration to prevent tasks from running indefinitely
6-
maxDuration: 300, // Stop executing after 300 secs (5 mins) of compute
5+
// Set an optional maxComputeSeconds to prevent tasks from running indefinitely
6+
maxComputeSeconds: 300, // Stop executing after 300 secs (5 mins) of compute
77
run: async (payload: any, { ctx }) => {
88
logger.log("Hello, world!", { payload, ctx });
99

packages/cli-v3/templates/trigger.config.mjs.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default defineConfig({
77
// The max compute seconds a task is allowed to run. If the task run exceeds this duration, it will be stopped.
88
// You can override this on an individual task.
99
// See https://trigger.dev/docs/runs/max-duration
10-
maxDuration: 3600,
10+
maxComputeSeconds: 3600,
1111
retries: {
1212
enabledInDev: true,
1313
default: {

packages/cli-v3/templates/trigger.config.ts.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default defineConfig({
77
// The max compute seconds a task is allowed to run. If the task run exceeds this duration, it will be stopped.
88
// You can override this on an individual task.
99
// See https://trigger.dev/docs/runs/max-duration
10-
maxDuration: 3600,
10+
maxComputeSeconds: 3600,
1111
retries: {
1212
enabledInDev: true,
1313
default: {

0 commit comments

Comments
 (0)