Interface CronExpressionService
public interface CronExpressionService
The interface Cron service.
-
Method Summary
Modifier and TypeMethodDescriptioncreateConFromDaysOfMonth
(List<Integer> daysOfMonth, LocalTime time) Create con from days of month.createCronFromDaysOfWeek
(List<DayOfWeek> daysOfWeek, LocalTime time) Create cron from days of week.getHumanReadableDescription
(String cron, Locale locale) Gets human readable description.getNextExecution
(String cron, Date lastExecution) Get the next execution.boolean
isTimeToExecute
(String cron, Date lastExecution) Get the next execution.boolean
isTimeToExecute
(String cron, Date lastExecution, com.atlassian.jira.user.ApplicationUser user) Get the next execution based on the timezone of the userboolean
isValidCronExpression
(String cron) Is valid cron expression boolean.
-
Method Details
-
createCronFromDaysOfWeek
Create cron from days of week.- Parameters:
daysOfWeek
- the days of weektime
- the time- Returns:
- the string
-
createConFromDaysOfMonth
Create con from days of month.- Parameters:
daysOfMonth
- the days of monthtime
- the time- Returns:
- the string
-
getHumanReadableDescription
Gets human readable description.- Parameters:
cron
- the cronlocale
- the locale- Returns:
- the human readable description
-
isValidCronExpression
Is valid cron expression boolean.- Parameters:
cron
- the cron- Returns:
- the boolean
-
getNextExecution
Get the next execution.- Parameters:
cron
- the cronlastExecution
- the last execution date- Returns:
- the boolean
-
isTimeToExecute
Get the next execution.- Parameters:
cron
- the cronlastExecution
- the last execution date- Returns:
- the boolean
-
isTimeToExecute
boolean isTimeToExecute(String cron, Date lastExecution, com.atlassian.jira.user.ApplicationUser user) Get the next execution based on the timezone of the user- Parameters:
cron
- the cronlastExecution
- the last execution dateuser
- the user- Returns:
- the boolean
-