public final class CronSchedule extends Object
RScheduledExecutorService
.
Fully compatible with quartz cron expression.RScheduledExecutorService.schedule(Runnable, CronSchedule)
Modifier and Type | Method and Description |
---|---|
static CronSchedule |
dailyAtHourAndMinute(int hour,
int minute)
Creates cron expression which schedule task execution
every day at the given time
|
CronExpression |
getExpression() |
static CronSchedule |
monthlyOnDayAndHourAndMinute(int dayOfMonth,
int hour,
int minute)
Creates cron expression which schedule task execution
every given day of the month at the given time
|
static CronSchedule |
of(String expression)
Creates cron expression object with defined expression string
|
static 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.
|
public static CronSchedule of(String expression)
expression
- of cronIllegalArgumentException
- wrapping a ParseException if the expression is invalidpublic static CronSchedule dailyAtHourAndMinute(int hour, int minute)
hour
- of scheduleminute
- of scheduleIllegalArgumentException
- wrapping a ParseException if the expression is invalidpublic static CronSchedule weeklyOnDayAndHourAndMinute(int hour, int minute, Integer... daysOfWeek)
hour
- of scheduleminute
- of scheduledaysOfWeek
- - Calendar object constantspublic static CronSchedule monthlyOnDayAndHourAndMinute(int dayOfMonth, int hour, int minute)
hour
- of scheduleminute
- of scheduledayOfMonth
- of schedulepublic CronExpression getExpression()
Copyright © 2014–2020 Redisson. All rights reserved.