Search code examples
quartz-scheduler

pass parameter from job to joblistener in quartz


I am using quartz to schedule my job. Sometimes I need listener to do something after a run, but sometimes I don't need it to run.

Can I pass parameter from job instance to joblistener?


Solution

  • See JobExecutionContext.setResult() and getResult(), which you can use from within the job and the listener.