Class CronExpressionValidator
java.lang.Object
com.atlassian.confluence.plugins.schedule.admin.support.CronExpressionValidator
Validates a cron expression, and returns the future executions.
-
Constructor Summary
ConstructorsConstructorDescriptionCronExpressionValidator
(com.atlassian.scheduler.core.spi.SchedulerServiceConfiguration schedulerConfig) -
Method Summary
Modifier and TypeMethodDescriptiongetFutureSchedules
(String cronExpressionValue, int limit) Finds the next execution occurrences of a cron expression from now.getFutureSchedules
(String cronExpressionValue, int limit, Date fromDate) Finds the next execution occurrences of a cron expression from now.
-
Constructor Details
-
CronExpressionValidator
@Autowired public CronExpressionValidator(com.atlassian.scheduler.core.spi.SchedulerServiceConfiguration schedulerConfig)
-
-
Method Details
-
getFutureSchedules
public List<Date> getFutureSchedules(String cronExpressionValue, int limit) throws com.atlassian.scheduler.cron.CronSyntaxException Finds the next execution occurrences of a cron expression from now.- Parameters:
cronExpressionValue
- the expression to evaluationlimit
- the maximum number of dates to return- Returns:
- a list of update "limit" dates for the next executions
- Throws:
com.atlassian.scheduler.cron.CronSyntaxException
- if the cron expression is invalid
-
getFutureSchedules
public List<Date> getFutureSchedules(String cronExpressionValue, int limit, Date fromDate) throws com.atlassian.scheduler.cron.CronSyntaxException Finds the next execution occurrences of a cron expression from now.- Parameters:
cronExpressionValue
- the expression to evaluationlimit
- the maximum number of dates to returnfromDate
- the date to start from, or now if null- Returns:
- a list of update "limit" dates for the next executions
- Throws:
com.atlassian.scheduler.cron.CronSyntaxException
- if the cron expression is invalid
-