Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DemoJob {
- static triggers = {
- cron name: 'testTrigger', cronExpression: "0 0/15 * * * ?"
- }
- def execute() {
- log.info "Job Executed"
- }
- }
- //Output:-
- May 28, 2013 12:52:21 PM org.apache.coyote.AbstractProtocol init
- INFO: Initializing ProtocolHandler ["http-bio-8080"]
- May 28, 2013 12:52:21 PM org.apache.catalina.core.StandardService startInternal
- INFO: Starting service Tomcat
- May 28, 2013 12:52:21 PM org.apache.catalina.core.StandardEngine startInternal
- INFO: Starting Servlet Engine: Apache Tomcat/7.0.39
- May 28, 2013 12:52:21 PM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
- INFO: No global web.xml found
- May 28, 2013 12:52:21 PM org.apache.catalina.core.ApplicationContext log
- | Server running. Browse to http://localhost:8080/quartzDemoApp
- 2013-05-28 13:00:00,079 [quartzScheduler_Worker-1] INFO quartz.DemoJob - Job Executed
- 2013-05-28 13:15:00,012 [quartzScheduler_Worker-2] INFO quartz.DemoJob - Job Executed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement