With ScriptRunner it seems that there is a library that makes a "human readable" translation for a Interval/Cron expression.
Like this example, ScriptRunner translate 0 0 6 1 3 ? to At 6:00 AM on day 1 of the month, only in March
How can I access this function with the ScritRunner console ? My goal is to write a Groovy script that will send this information in an email.
So far I managed to translate the expression into the next date of execution with the CronSequenceGenerator function but I would like to get the detailled explanation.
import org.springframework.scheduling.support.CronSequenceGenerator;
CronSequenceGenerator generator = new CronSequenceGenerator(retJob.cron);
Date nextRunDate= generator.next(new Date());
retJob.nexExcutionDate = nextRunDate.format("yyyy.MM.dd 'at' hh:mm:ss z")
Thanks !