Bird
0
0

You wrote the cron expression "0 60 10 * * ?" in your Spring Boot @Scheduled annotation, but the task never runs. What is the problem?

medium📝 Debug Q6 of 15
Spring Boot - Async Processing
You wrote the cron expression "0 60 10 * * ?" in your Spring Boot @Scheduled annotation, but the task never runs. What is the problem?
AThe hour field 10 is invalid
B60 is invalid in the minute field; minutes go from 0 to 59
CThe question mark is not allowed in this position
DThe seconds field cannot be zero
Step-by-Step Solution
Solution:
  1. Step 1: Check the minute field value

    The minute field in cron expressions accepts values from 0 to 59. Using 60 is invalid and causes the scheduler to ignore the task.
  2. Step 2: Confirm other fields are valid

    The hour 10 and question mark in day-of-week are valid. Seconds field 0 is valid.
  3. Final Answer:

    60 is invalid in the minute field; minutes go from 0 to 59 -> Option B
  4. Quick Check:

    Minute field max is 59, 60 causes failure [OK]
Quick Trick: Minutes max value is 59, not 60 [OK]
Common Mistakes:
  • Assuming 60 is valid for minutes
  • Blaming hour or seconds fields incorrectly
  • Ignoring cron field value ranges

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes