grails 中的作业每分钟的 cron 定义是什么?

What is the cron definition for each minute for a job in grails?

我每分钟都在使用 Grails 的 Quartz 插件进行同步作业,但我无法使用 0 * * * * * 定义并抛出一些异常:

Error loading plugin manager: Unable to locate constructor with Class parameter for class grails.plugins.quartz.DefaultGrailsJobClass (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)

Caused by: java.lang.IllegalArgumentException: Cron expression '0 * * * * *' in the job class cl.ionix.softoken.jobs.SendRefreshStatusByMinuteJob is not a valid cron expression

每分钟执行的正确 cron 表达式是什么?

这是每分钟触发的 cron 表达式:

0 0/1 * * * *

文档:http://www.quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontrigger

你可以使用这个:

0 0/1 * * * ?

根据 doc

Either Day-of-Week or Day-of-Month must be "?", or you will get an error since support by the underlying library is not complete. So you can't specify both fields, nor leave both as the all values wildcard "*"; this is a departure from the unix crontab specification.