Recall & Review
beginner Click to reveal answer
What is a cron job in the context of scheduled tasks?
A cron job is a scheduled task that runs automatically at specified times or intervals, like a reminder that triggers actions without manual start.
beginner Click to reveal answer
How do you import the cron module in Deno for scheduling tasks?You import it using: <code>import { Cron } from "https://deno.land/x/cron@v1.2.0/mod.ts";</code> to access cron scheduling features.intermediate Click to reveal answer
What does the cron expression
"*/5 * * * *" mean?It means the task runs every 5 minutes, at minute 0, 5, 10, 15, and so on, every hour of every day.
beginner Click to reveal answer
How do you start a cron job in Deno after creating it?
You call the
start() method on the Cron instance, like cron.start();, to begin running the scheduled tasks.intermediate Click to reveal answer
Why is it important to stop a cron job when it is no longer needed?
Stopping a cron job frees resources and prevents unwanted tasks from running, helping keep your application efficient and predictable.
Which Deno module is commonly used for cron scheduling?
✗ Incorrect
The cron module at https://deno.land/x/cron provides scheduling features for tasks.
What does the cron expression "0 0 * * *" schedule?
✗ Incorrect
The expression means the task runs daily at 00:00 (midnight).
How do you define the function to run on a cron schedule in Deno?
✗ Incorrect
You provide the function as a callback when creating the Cron instance.
What method stops a running cron job in Deno?
✗ Incorrect
The stop() method halts the cron job from running further.
Which of these is NOT a valid part of a cron expression?
✗ Incorrect
Standard cron expressions do not include a year field.
Explain how to create and start a scheduled task using cron in Deno.
Think about the steps from import to running the task.
You got /3 concepts.
Describe the meaning of a cron expression and how it controls task timing.
Imagine setting an alarm clock for specific times.
You got /3 concepts.
