PDA

View Full Version : Quartz job not firing on Tomcat/Amazon Ec2



imrank1
May 3rd, 2011, 07:16 PM
Hi I've built a grails application that is using the Quartz plugin to run periodic jobs. I've been building functionality to perdically push my log files to my S3 account. ( This was built to get around the current drawback of elb's built it in log rotating which only keeps the last hour ) .

To test it out I created one job that logs a message every 5 seconds and another that zips up the log files and pushes them up to S3 every minute. Now when I run on my own machine using the built in Jetty everythign works fine.

However when I go to Elastic Bean stalk and upload my project the log statements never appear and no logs are pushed up to my S3 instance. ( The app is successfully deployed ) . So it seems the scheduled jobs are never executed.... Not seeing any error messages either.

Has anyone else expeirenced this? Is there a particular setting that needs to be set in Tomcat for permissions regarding jobs?

Thanks
P.S I also posted this question in the Amazon forums as perhaps it is a configuration setting in elastic bean stalk for tomcat

rmckinnon@hersheys.com
May 11th, 2011, 02:20 PM
I am seeing the same issue with one of my Apps and we are looking for a solution.

imrank1
May 11th, 2011, 02:30 PM
Hi , I actually figured out the problem. Make sure your jobs are in the default package. Moving them into the default package fixed the problem for me. If you are using grails and the quartz plugin also note that running in the test environment ( grails test war ) will cause quartz jobs to not run. You have to build with either dev or prod environment.

hope that helps.

Imran