Reputation: 31
Here is the Code:
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();
}
}
*This Above Job never runs at 6 a.m. I am unable to find the issue. Please Help
Upvotes: 0
Views: 506
Reputation: 46
grails create-job
to create a job class which should be end with Job
0 0 6 * * ?
. Not sure whether quartz can parse 00
.autoStartup = true
Upvotes: 0
Reputation: 3016
Your class should ends with Job. Just rename FollowUpJobOne to FollowUpOneJob
Upvotes: 2