I was wondering if it possible to get the trigger cron expression from a Quartz Job.
I'm trying to do this for a few unit tests.
Gist from bassmartin's Answer
Yes it's possible:
Inject the JobManagerService
def jobManagerService
Fetch the triggers of a job
List triggers = jobManagerService.quartzScheduler.getTriggersOfJob(JobKey.jobKey(MyJob.canonicalName, GrailsJobClassConstants.DEFAULT_GROUP))
Assuming your triggers are CronTrigger
triggers.each { trigger ->
println trigger.getCronExpression()
}