You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update schedule & test navigation for the new dashboard UI (#4252)
The dashboard was redesigned and two pages moved, but the docs still
described the old sidebar:
- **Schedules** no longer has its own sidebar page — schedules are
managed from the **Tasks** page (open a scheduled task to create / view
/ edit / enable-disable / delete them).
- The standalone list-based **Test** page is deprecated — you test a
task from its own **Test** button now.
## Changes
- `tasks/scheduled.mdx`: rewrote the "attaching schedules" and "testing
schedules" sections for the Tasks-based flow, added a "managing
schedules in the dashboard" section, and added explicit callouts noting
both pages moved (so readers — and search — aren't pointed at a page
that no longer exists). Re-shot the four schedule screenshots and fixed
a mislabeled alt text.
- `run-tests.mdx`, `snippets/step-run-test.mdx`,
`guides/examples/sentry-error-tracking.mdx`: replaced "select the Test
page in the sidebar" with the task-first flow plus a callout, and
refreshed `test-dashboard.png`.
TRI-11939
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,7 +181,7 @@ pnpm exec trigger dev --log-level debug
181
181
182
182
6. Navigate to the `hello-world` project in your local dashboard at localhost:3030 and you should see the list of tasks.
183
183
184
-
7.Go to the "Test" page in the sidebar and select a task. Then enter a payload and click "Run test". You can tell what the payloads should be by looking at the relevant task file inside the reference project's `src/trigger` folder. Many of them accept an empty payload.
184
+
7.On the Tasks page, open a task and press the "Test" button to open its test page. Then enter a payload and click "Run test". You can tell what the payloads should be by looking at the relevant task file inside the reference project's `src/trigger` folder. Many of them accept an empty payload.
185
185
186
186
8. Feel free to add additional files in the reference project's `src/trigger` dir to test out specific aspects of the system, or add in edge cases.
Copy file name to clipboardExpand all lines: docs/guides/examples/sentry-error-tracking.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,7 +169,7 @@ After creating the task, deploy your project.
169
169
170
170
</CodeGroup>
171
171
172
-
Once deployed, navigate to the `test`page in the sidebar of your [Trigger.dev dashboard](https://cloud.trigger.dev), click on your `prod` environment, and select the `sentryErrorTest` task.
172
+
Once deployed, open the `sentry-error-test`task in your [Trigger.dev dashboard](https://cloud.trigger.dev) (make sure you're in your `prod` environment) and press the "Test" button to open the test page for it.
173
173
174
174
Run a test task with an empty payload by clicking the `Run test` button.
Copy file name to clipboardExpand all lines: docs/snippets/step-run-test.mdx
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,10 @@
1
1
<Steptitle="Perform a test run using the dashboard">
2
2
3
-
The CLI `dev` command spits out various useful URLs. Right now we want to visit the Test page.
3
+
The CLI `dev` command spits out various useful URLs, including a link to the dashboard. Open it, find your Example task on the Tasks page, and press the "Test" button to open its test page.
4
4
5
-
You should see our Example task in the list <Iconicon="circle-1"iconType="solid"size={20}color="F43F47" />, select it. Most tasks have a "payload" which you enter in the JSON editor <Iconicon="circle-2"iconType="solid"size={20}color="F43F47" />, but our example task doesn't need any input.
5
+
Most tasks have a "payload" which you enter in the JSON editor, but our example task doesn't need any input. You can also configure run options, pre-populate the form from recent runs, and save run templates.
6
6
7
-
You can configure options on the run <Iconicon="circle-3"iconType="solid"size={20}color="F43F47" />, view recent payloads <Iconicon="circle-4"iconType="solid"size={20}color="F43F47" />, and create run templates <Iconicon="circle-5"iconType="solid"size={20}color="F43F47" />.
8
-
9
-
Press the "Run test" button <Iconicon="circle-6"iconType="solid"size={20}color="F43F47" />.
When you run the [dev](/cli-dev-commands) or [deploy](/cli-deploy-commands) commands, declarative schedules will be synced. If you add, delete or edit the `cron` property it will be updated when you run these commands. You can view your schedules on the Schedules page in the dashboard.
130
+
When you run the [dev](/cli-dev-commands) or [deploy](/cli-deploy-commands) commands, declarative schedules will be synced. If you add, delete or edit the `cron` property it will be updated when you run these commands. You can view your synced schedules in the dashboard: open the task on the Tasks page and check its "Schedules" tab.
131
131
132
132
### Imperative schedules
133
133
134
-
Alternatively you can explicitly attach schedules to a `schedules.task`. You can do this in the Schedules page in the dashboard by just pressing the "New schedule" button, or you can use the SDK to create schedules.
134
+
Alternatively you can explicitly attach schedules to a `schedules.task`. You can do this in the dashboard from the scheduled task's page by pressing the "Create schedule" button, or you can use the SDK to create schedules.
135
135
136
136
The advantage of imperative schedules is that they can be created dynamically, for example, you could create a schedule for each user in your database. They can also be activated, disabled, edited, and deleted without deploying new code by using the SDK or dashboard.
137
137
@@ -166,26 +166,37 @@ There are two situations when a scheduled task won't trigger:
166
166
167
167
## Attaching schedules in the dashboard
168
168
169
-
You need to attach a schedule to a task before it will run on a schedule. You can attach static schedules in the dashboard:
169
+
You need to attach a schedule to a task before it will run on a schedule. You can attach imperative schedules in the dashboard:
170
+
171
+
<Note>
172
+
**The Schedules page has moved.** There is no longer a standalone "Schedules" page in the
173
+
sidebar. Schedules now live on the Tasks page: open a scheduled task to create, view, edit,
174
+
enable/disable, and delete its schedules. The old `/schedules` URL redirects to the Tasks page.
175
+
176
+
The scheduled task must already exist first — define it in your code with `schedules.task()` and
177
+
sync it to the environment by running the [dev](/cli-dev-commands) or
178
+
[deploy](/cli-deploy-commands) command so it appears on the Tasks page. A project with no tasks
179
+
yet will only show the deploy onboarding.
180
+
</Note>
170
181
171
182
<Steps>
172
183
173
-
<Steptitle="Go to the Schedules page">
174
-
In the sidebar select the "Schedules" page, then press the "New schedule" button. Or you can
175
-
follow the onboarding and press the create in dashboard button. 
184
+
<Steptitle="Open the scheduled task">
185
+
In the sidebar select the "Tasks" page, then select the scheduled task you want to attach a
186
+
schedule to (scheduled tasks have a clock icon, and you can filter the list to Scheduled).
| Task | The id of the task you want to attach to. |
188
-
| Cron pattern | The schedule in cron format. |
199
+
| Cron pattern | The schedule in cron format. You can also describe it in natural language and press "Generate" to fill this in.|
189
200
| Timezone | The timezone the schedule will run in. Defaults to "UTC" |
190
201
| External id | An optional external id, usually you'd use a userId. |
191
202
| Deduplication key | An optional deduplication key. If you pass the same value, it will update rather than create. Scoped per project, not per environment. |
@@ -195,6 +206,12 @@ These are the options when creating a schedule:
195
206
196
207
</Steps>
197
208
209
+
## Managing schedules in the dashboard
210
+
211
+
Open the scheduled task and switch to the "Schedules" tab to see every schedule attached to it — both declarative and imperative — with its type, cron pattern, external id, next and last run, and status.
212
+
213
+
Click a schedule to open the inspector, where you can **enable/disable**, **edit**, or **delete** imperative schedules without deploying new code. Declarative schedules are managed in your code, so they can't be edited or deleted from here.
214
+
198
215
## Attaching schedules with the SDK
199
216
200
217
You call `schedules.create()` to create a schedule from your code. Here's the simplest possible example:
@@ -302,14 +319,19 @@ You can also retrieve, list, delete, deactivate and re-activate schedules using
302
319
303
320
You can test a scheduled task in the dashboard. Note that the `scheduleId` will always come through as `sched_1234` to the run.
304
321
322
+
<Note>
323
+
There is no longer a standalone "Test" page in the sidebar. You test a task from the task itself —
324
+
open it on the Tasks page and press the "Test schedule" button.
325
+
</Note>
326
+
305
327
<Steps>
306
328
307
-
<Steptitle="Go to the Test page">
308
-
In the sidebar select the "Test" page, then select a scheduled task from the list (they have a
309
-
clock icon on them) 
329
+
<Steptitle="Open the test page for your task">
330
+
On the "Tasks" page, open your scheduled task and press the "Test schedule" button.
0 commit comments