Skip to content

Commit 208ae45

Browse files
fix: Update Cron Triggers documentation to use TypeScript example component
1 parent 99f5963 commit 208ae45

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

src/content/docs/workers/configuration/cron-triggers.mdx

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,9 @@ Cron Triggers execute on UTC time.
2727

2828
To respond to a Cron Trigger, you must add a [`"scheduled"` handler](/workers/runtime-apis/handlers/scheduled/) to your Worker.
2929

30-
import { TabItem, Tabs } from "~/components";
31-
32-
<Tabs syncKey="workersExamples"> <TabItem label="JavaScript" icon="seti:javascript">
33-
34-
```js
35-
export default {
36-
async scheduled(event, env, ctx) {
37-
console.log("cron processed");
38-
},
39-
};
40-
```
41-
42-
</TabItem> <TabItem label="TypeScript" icon="seti:typescript">
30+
import { TypeScriptExample } from "~/components";
4331

32+
<TypeScriptExample>
4433
```ts
4534
interface Env {}
4635
export default {
@@ -53,8 +42,7 @@ export default {
5342
},
5443
};
5544
```
56-
57-
</TabItem> </Tabs>
45+
</TypeScriptExample>
5846

5947
Refer to the following additional examples to write your code:
6048

0 commit comments

Comments
 (0)