Class CronServiceImpl
java.lang.Object
com.codebarrel.automation.api.schedule.CronServiceImpl
- All Implemented Interfaces:
CronService
-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
CronServiceImpl
-
-
Method Details
-
validate
Description copied from interface:CronServiceReturns an error collection with all errors in the error messages.- Specified by:
validatein interfaceCronService- Parameters:
cronExpression- The cron expression to validate.- Returns:
- an error collection with all errors in the error messages.
-
getNextExecution
Description copied from interface:CronServiceCalculates the next execution for the provided cron string using now as the starting date- Specified by:
getNextExecutionin interfaceCronService- 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
-