Skip to content

Commit 8d5539e

Browse files
ntextreme3Oxyjun
andauthored
fix some typos in schedule-tasks.mdx (cloudflare#21526)
* fix some typos in schedule-tasks.mdx * Triggering GH compiles * Undoing redundant change --------- Co-authored-by: Jun Lee <[email protected]>
1 parent ccbd848 commit 8d5539e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/content/docs/agents/api-reference/schedule-tasks.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { Agent } from "agents"
2323
export class SchedulingAgent extends Agent {
2424
async onRequest(request) {
2525
// Handle an incoming request
26-
// Schedule a task 5 minutes from now
26+
// Schedule a task 10 minutes from now
2727
// Calls the "checkFlights" method
2828
let { taskId } = await this.schedule(600, "checkFlights", { flight: "DL264", date: "2025-02-23" });
2929
return Response.json({ taskId });
@@ -54,11 +54,11 @@ let task = await this.schedule(10, "someTask", { message: "hello" });
5454
// schedule a task to run at a specific date
5555
let task = await this.schedule(new Date("2025-01-01"), "someTask", {});
5656

57-
// schedule a task to run every 10 seconds
57+
// schedule a task to run every 10 minutes
5858
let { id } = await this.schedule("*/10 * * * *", "someTask", { message: "hello" });
5959

60-
// schedule a task to run every 10 seconds, but only on Mondays
61-
let task = await this.schedule("0 0 * * 1", "someTask", { message: "hello" });
60+
// schedule a task to run every 10 minutes, but only on Mondays
61+
let task = await this.schedule("*/10 * * * 1", "someTask", { message: "hello" });
6262

6363
// cancel a scheduled task
6464
this.cancelSchedule(task.id);

0 commit comments

Comments
 (0)