CronSchedule prototype = builder.prototype();
prototype.task().set( task );
prototype.start().set( start );
prototype.cronExpression().set( cronExpression );
CronSchedule schedule = builder.newInstance();
logger.info( "Schedule {} created: {}", schedule.presentationString(), schedule.identity().get() );
return schedule;
}
private CronSchedule newPersistentCronSchedule( Task task, String cronExpression, DateTime start )
{