class OnceSchedulingStrategy implements ISchedulingStrategy {

    @Override
    public void restore(final ISchedulerEntry entry) throws SchedulingStrategyExecutionException {
        try {
            LocalDateTime now = LocalDateTime.now(ZoneOffset.UTC);
            LocalDateTime time = LocalDateTime.parse((String) entry.getState().getValue(timeFieldName));
            Boolean ntl = (Boolean) entry.getState().getValue(neverTooLateFieldName);

            if (now.isAfter(time) && !ntl) {
                entry.cancel();
            } else {
                entry.scheduleNext(datetimeToMillis(time));
            }
        } catch (ReadValueException | InvalidArgumentException | EntryScheduleException | EntryStorageAccessException e) {
            throw new SchedulingStrategyExecutionException("Error occurred restoring an entry.", e);
        }
    }

    public  OnceSchedulingStrategy();

}