Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing parameters to Quartz job

 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how to pass parameters to quartz job in grails and how to read those parameters in the job class.
 
Peter Ledbrook
author
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends what sort of parameters you are talking about. You can have any Spring-managed object (such as a Grails service) automatically injected into your job:



You can also access configuration data like so:



The config property on the application object gives you access to the data specified in grails-app/conf/Config.groovy.

Cheers,

Peter
 
Anton Vitrilo
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JobDetail object contains various property settings for the Job, as well as a JobDataMap, which can be used to store state information for a given instance of your job class.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic