查了一些文章,有的说「*」代表所有值,「?」代表不确定的值,你不想设置的值。
但不想设置和代表所有什么不同呢,在我看来一样。
Quartz官方文档是这么说的:
http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-lesson-06.html
The ‘?’ character is allowed for the day-of-month and day-of-week fields. It is used to specify “no specific value”. This is useful when you need to specify something in one of the two fields, but not the other. See the examples below (and CronTrigger JavaDoc) for clarification.
说「?」使用在day-of-month and day-of-week 这两个字段,被用来指定不确定的值,和上面说的差不多。
StackOverFlow上有一个帖子,说在Spring中,「*」和「?」是一个意思,具体请看下面连接中,点赞数比较多的那个回答,和这个回答下面的追答。
http://stackoverflow.com/questions/30341067/difference-between-and-in-spring-scheduledcron