Java – * and *? In spring @ scheduled (cron = “…”)

I've been looking at the spring boot example to schedule tasks( https://spring.io/guides/gs/scheduling-tasks/ )And read some documents( https://javahunter.wordpress.com/2011/05/05/cronscheduler-in-spring/ ), I see * and? Almost interchangeable

For example, row

@Scheduled(cron = "0 15 10 ? * *")

and

@Scheduled(cron = "0 15 10 * * ?")

Do the same thing So * and? What's the difference?

Solution

Asterix represents all possible values Question marks apply to non-specific values

Copy from tutorial

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>