Package org.redisson.api
Class CronSchedule
java.lang.Object
org.redisson.api.CronSchedule
Cron expression object used in
RScheduledExecutorService
.
Fully compatible with quartz cron expression.- Author:
- Nikita Koksharov
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic CronSchedule
dailyAtHourAndMinute
(int hour, int minute) Creates cron expression which schedule task execution every day at the given timestatic CronSchedule
dailyAtHourAndMinute
(int hour, int minute, ZoneId zoneId) Creates cron expression which schedule task execution every day at the given time in specified time-zone IDstatic CronSchedule
monthlyOnDayAndHourAndMinute
(int dayOfMonth, int hour, int minute) Creates cron expression which schedule task execution every given day of the month at the given timestatic CronSchedule
monthlyOnDayAndHourAndMinute
(int dayOfMonth, int hour, int minute, ZoneId zoneId) Creates cron expression which schedule task execution every given day of the month at the given time in specified time-zone ID.static CronSchedule
Creates cron expression object with defined expression stringstatic CronSchedule
Creates cron expression object with defined expression string and time-zone IDstatic CronSchedule
weeklyOnDayAndHourAndMinute
(int hour, int minute, Integer... daysOfWeek) Creates cron expression which schedule task execution every given days of the week at the given time.static CronSchedule
weeklyOnDayAndHourAndMinute
(int hour, int minute, ZoneId zoneId, Integer... daysOfWeek) Creates cron expression which schedule task execution every given days of the week at the given time in specified time-zone ID.
-
Method Details
-
of
Creates cron expression object with defined expression string- Parameters:
expression
- of cron- Returns:
- object
- Throws:
IllegalArgumentException
- wrapping a ParseException if the expression is invalid
-
of
Creates cron expression object with defined expression string and time-zone ID- Parameters:
expression
- of cronzoneId
- id of zone- Returns:
- object
- Throws:
IllegalArgumentException
- wrapping a ParseException if the expression is invalid
-
dailyAtHourAndMinute
Creates cron expression which schedule task execution every day at the given time- Parameters:
hour
- of scheduleminute
- of schedule- Returns:
- object
- Throws:
IllegalArgumentException
- wrapping a ParseException if the expression is invalid
-
dailyAtHourAndMinute
Creates cron expression which schedule task execution every day at the given time in specified time-zone ID- Parameters:
hour
- of scheduleminute
- of schedulezoneId
- id of zone- Returns:
- object
- Throws:
IllegalArgumentException
- wrapping a ParseException if the expression is invalid
-
weeklyOnDayAndHourAndMinute
Creates cron expression which schedule task execution every given days of the week at the given time. Use Calendar object constants to define day.- Parameters:
hour
- of scheduleminute
- of scheduledaysOfWeek
- - Calendar object constants- Returns:
- object
-
weeklyOnDayAndHourAndMinute
public static CronSchedule weeklyOnDayAndHourAndMinute(int hour, int minute, ZoneId zoneId, Integer... daysOfWeek) Creates cron expression which schedule task execution every given days of the week at the given time in specified time-zone ID. Use Calendar object constants to define day.- Parameters:
hour
- of scheduleminute
- of schedulezoneId
- id of zonedaysOfWeek
- - Calendar object constants- Returns:
- object
-
monthlyOnDayAndHourAndMinute
Creates cron expression which schedule task execution every given day of the month at the given time- Parameters:
dayOfMonth
- of schedulehour
- of scheduleminute
- of schedule- Returns:
- object
-
monthlyOnDayAndHourAndMinute
public static CronSchedule monthlyOnDayAndHourAndMinute(int dayOfMonth, int hour, int minute, ZoneId zoneId) Creates cron expression which schedule task execution every given day of the month at the given time in specified time-zone ID.- Parameters:
dayOfMonth
- of schedulehour
- of scheduleminute
- of schedulezoneId
- id of zone- Returns:
- object
-
getExpression
-
getZoneId
-