Class CronExpressionValidator
- java.lang.Object
-
- com.atlassian.confluence.plugins.schedule.admin.support.CronExpressionValidator
-
public class CronExpressionValidator extends Object
Validates a cron expression, and returns the future executions.
-
-
Constructor Summary
Constructors Constructor Description CronExpressionValidator(com.atlassian.scheduler.core.spi.SchedulerServiceConfiguration schedulerConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Date>
getFutureSchedules(String cronExpressionValue, int limit)
Finds the next execution occurrences of a cron expression from now.List<Date>
getFutureSchedules(String cronExpressionValue, int limit, Date fromDate)
Finds the next execution occurrences of a cron expression from now.
-
-
-
Method Detail
-
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
-
-