Home Grails Scheduled Quartz Job never runs
Reply: 2

Grails Scheduled Quartz Job never runs

Simran Kaur
1#
Simran Kaur Published in 2018-02-09 04:17:29Z

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

Evgeny Smirnov
2#
Evgeny Smirnov Reply to 2018-02-09 08:16:31Z

Your class should ends with Job. Just rename FollowUpJobOne to FollowUpOneJob

CHAAAA
3#
CHAAAA Reply to 2018-02-09 09:02:36Z
  1. use grails create-jobs to create a job class which should be end with Job
  2. cronExpression use 0 0 6 * * ?. Not sure whether quartz can parse 00.
  3. confirm autoStartup = true
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.423653 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO