以下是代码:
class FollowUpJobOne {
FollowUpMailService followUpMailService;
static triggers = {
cron name: 'jobOneForFollowUp', cronExpression: "00 00 6 ? * *" //6 AM everyday as per server time
}
def execute() {
log.debug("control in Follow up job");
followUpMailService.sendFollowUpMails();
followUpMailService.sendFollowUpMailsForDandO();
}
}
*这个上面的工作从未在早上6点运行。 我无法找到问题。 请帮忙
答案 0 :(得分:2)
您的课程应以作业结尾。 只需将 FollowUpJobOne 重命名为 FollowUpOneJob
答案 1 :(得分:0)
grails create-job
创建一个应以Job
0 0 6 * * ?
。不确定quartz是否可以解析00
。autoStartup = true