Search in sources :

Example 1 with Cron

use of com.cronutils.model.Cron in project kylo by Teradata.

the class FeedOnTimeArrivalMetric method generateCronDescription.

private String generateCronDescription(String cronExp) {
    CronDefinition quartzDef = CronDefinitionBuilder.instanceDefinitionFor(CronType.QUARTZ);
    CronParser parser = new CronParser(quartzDef);
    Cron c = parser.parse(cronExp);
    return CronDescriptor.instance(Locale.US).describe(c);
}
Also used : CronDefinition(com.cronutils.model.definition.CronDefinition) Cron(com.cronutils.model.Cron) CronParser(com.cronutils.parser.CronParser)

Aggregations

Cron (com.cronutils.model.Cron)1 CronDefinition (com.cronutils.model.definition.CronDefinition)1 CronParser (com.cronutils.parser.CronParser)1