New in Spring 5.3: Improved Cron Expressions
If you regularly listen to A Bootiful Podcast, you might have heard about the improvements we made to Spring Framework’s cron support. Cron expressions are mostly used in Spring applications through the @Scheduled
annotation. In Spring 5.3, we introduced the CronExpression
class, which represents — you guessed it — a cron expression.
CronExpression
replaces CronSequenceGenerator
, which is based on java.util.Calendar
and which has several known issues that none of the Spring team members felt comfortable solving. Introducing a new type allowed us to use the superior java.time
APIs, solve the…