It means the task runs every day at midnight (00:00). The fields represent: minute=0, hour=0, every day, every month, every weekday.
Click to reveal answer
beginner
Explain the cron expression */15 * * * *.
This runs a task every 15 minutes. The */15 in the minute field means 'every 15 minutes', while the other fields mean every hour, day, month, and weekday.
Click to reveal answer
intermediate
What does 0 9 * * 1-5 schedule?
It schedules a task to run at 9:00 AM every weekday (Monday to Friday). The 1-5 in the weekday field means Monday through Friday.
Click to reveal answer
intermediate
How do you schedule a cron job to run at 5:30 PM on the 1st of every month?
Use 30 17 1 * *. This means minute=30, hour=17 (5 PM), day=1, every month, every weekday.
Click to reveal answer
intermediate
What does the cron expression 0 0 1 1 * do?
It runs a task once a year at midnight on January 1st. The fields mean: minute=0, hour=0, day=1, month=1 (January), every day of the week.
Click to reveal answer
What does the cron expression 0 * * * * do?
ARuns a task every hour at the start of the hour
BRuns a task every minute
CRuns a task once a day at midnight
DRuns a task every day at noon
✗ Incorrect
The minute field is 0, so it runs at minute 0 of every hour, meaning at the start of every hour.
Which cron expression runs a task every Sunday at 3 AM?
A0 3 * * 7
BBoth A and B
C0 3 * * 1
D0 3 * * 0
✗ Incorrect
In cron, Sunday can be represented as 0 or 7 in the weekday field.
How often does */10 * * * * run?
AEvery 10 hours
BEvery 10 seconds
CEvery 10 minutes
DEvery 10 days
✗ Incorrect
The */10 in the minute field means every 10 minutes.
What does the * symbol mean in a cron expression?
AEvery possible value for that field
BNo value
COnly one specific value
DA comment
✗ Incorrect
The asterisk means 'every' possible value for that field.
Which cron expression runs a task at 11:45 PM every day?
A11 45 * * *
B23 45 * * *
C45 11 * * *
D45 23 * * *
✗ Incorrect
The first field is minutes (45), second is hour (23 = 11 PM).
Describe how to read a cron expression and explain what each field means.
Think of the cron expression as a schedule with five parts: minute, hour, day, month, and weekday.
You got /6 concepts.
Explain how to schedule a task to run every weekday at 8 AM using a cron expression.
Remember weekdays are numbers 1 to 5 in cron.
You got /6 concepts.
Practice
(1/5)
1. What does the cron expression 0 0 * * * do?
easy
A. Runs a task every minute
B. Runs a task every hour
C. Runs a task every day at midnight
D. Runs a task every Sunday at midnight
Solution
Step 1: Understand the cron fields
The expression has five fields: minute=0, hour=0, day=*, month=*, weekday=*. This means minute 0, hour 0, every day, every month, every weekday.
Step 2: Interpret the schedule
Since minute and hour are fixed at 0, and others are '*', the task runs once daily at 00:00 (midnight).
Final Answer:
Runs a task every day at midnight -> Option C
Quick Check:
0 0 * * * = daily at midnight [OK]
Hint: Minute and hour 0 means daily at midnight [OK]
Common Mistakes:
Thinking * means no schedule
Confusing hour and minute fields
Assuming it runs every minute
2. Which of the following is the correct cron syntax to run a job every 15 minutes?
easy
A. 15 * * * *
B. */15 * * * *
C. * 15 * * *
D. 0 */15 * * *
Solution
Step 1: Understand the minute field syntax
Using '*/15' in the minute field means every 15 minutes (0,15,30,45).
Step 2: Check other fields
All other fields are '*', meaning every hour, day, month, and weekday.
Final Answer:
*/15 * * * * -> Option B
Quick Check:
*/15 in minutes means every 15 minutes [OK]
Hint: */15 in minute field means every 15 minutes [OK]
Common Mistakes:
Using 15 in minute field runs only at minute 15
Putting 15 in hour field runs at 3 PM only
Using 0 */15 runs every 15 hours, not minutes
3. What is the output behavior of this cron expression: 30 6 * * 1?