Interface CronService
- All Known Implementing Classes:
CronServiceImpl
public interface CronService
Helper to deal with cron expressions.
-
Method Summary
Modifier and TypeMethodDescriptiongetNextExecution(Date now, String cronExpression) Calculates the next execution for the provided cron string using now as the starting dateReturns an error collection with all errors in the error messages.
-
Method Details
-
validate
Returns an error collection with all errors in the error messages.- Parameters:
cronExpression- The cron expression to validate.- Returns:
- an error collection with all errors in the error messages.
-
getNextExecution
Calculates the next execution for the provided cron string using now as the starting date- Parameters:
now- the date from which to calculate the next executioncronExpression- The cron expression to use to calculate the next execution time- Returns:
- the next execution time
-