grails - Grails中每分钟的cron定义是什么?

我正在每分钟使用Quartz插件进行Grails同步工作,但是我无法使用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表达式是什么?

最佳答案

您可以使用此:

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.

https://stackoverflow.com/questions/30032129/

相关文章:

grails - 如何使用smtp通过Grails 3发送电子邮件?

grails - (grails) com.sun.mail.smtp.SMTPSendFailed

ruby-on-rails - 使用cPanel进行版本控制和部署Rails项目

c# - 具有永久ShellExec连接的SharpSSH

ssh - 如何隐藏 ssh 期望用户/密码

performance - 我可以使用 Grails session 来存储整个域对象吗?

spring - 尝试连接到MongoLab时URL格式的MongoException

ssh - 如何让 Hudson CI 通过 SSH 检查 CVS 项目?

ssh - SSH默认进入指定目录吗?

grails - Grails-如何按名称对选项进行排序?