Grails Cron Job Issue

fitztho

New member
Hello,

I am working with the following setup:

Ubuntu 10.04 Server with Tomcat6 and Apache2

Grails 1.3.3

I have the following job defined:

Code:
class ImportUsersJob {
    def userDataService
    
	static triggers = {
		cron name: 'myTrigger', cronExpression: "45 6 * * * ?"
	
	}
    def execute() {
	    println("Job executed")
        userDataService.updateUsers()
    }
}

The issue is this: the job is not running at all. Is there some configuration that I am missing?
 

khumbert

New member
Your cron expression seems to be saying "Run every hour at 6 minutes 45 seconds." Is that correct?

Are you running this in the test environment? By default, jobs will not be executed when running under the test environment.

Any errors in the error.log? You can also enable debugging by putting the following in your log4j configuration:
debug 'grails.app.task'
 
Top