Skip to content

Commit 2c56607

Browse files
committed
Added docs for the environments declarative schedules feature
1 parent 303d8c8 commit 2c56607

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/tasks/scheduled.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ title: "Scheduled tasks (cron)"
33
description: "A task that is triggered on a recurring schedule using cron syntax."
44
---
55

6-
<Note>Scheduled tasks are only for recurring tasks. If you want to trigger a one-off task at a future time, you should [use the delay option](/triggering#delay).</Note>
6+
<Note>
7+
Scheduled tasks are only for recurring tasks. If you want to trigger a one-off task at a future
8+
time, you should [use the delay option](/triggering#delay).
9+
</Note>
710

811
## Defining a scheduled task
912

@@ -104,6 +107,9 @@ export const secondScheduledTask = schedules.task({
104107
//5am every day Tokyo time
105108
pattern: "0 5 * * *",
106109
timezone: "Asia/Tokyo",
110+
//optional, defaults to all environments
111+
//possible values are "PRODUCTION", "STAGING", "PREVIEW" and "DEVELOPMENT"
112+
environments: ["PRODUCTION", "STAGING"],
107113
},
108114
run: async (payload) => {},
109115
});

0 commit comments

Comments
 (0)