Class Schedules
- java.lang.Object
-
- com.github.kagkarlsson.scheduler.task.schedule.Schedules
-
public class Schedules extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Schedules.UnrecognizableSchedule
-
Constructor Summary
Constructors Constructor Description Schedules()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CronSchedule
cron(String cronPattern)
static CronSchedule
cron(String cronPattern, ZoneId zoneId)
static Daily
daily(LocalTime... times)
static Daily
daily(ZoneId zone, LocalTime... times)
static FixedDelay
fixedDelay(Duration delay)
static Schedule
parseSchedule(String scheduleString)
Currently supports Daily- and FixedDelay-schedule on the formats:
-
-
-
Method Detail
-
fixedDelay
public static FixedDelay fixedDelay(Duration delay)
-
cron
public static CronSchedule cron(String cronPattern)
-
cron
public static CronSchedule cron(String cronPattern, ZoneId zoneId)
-
parseSchedule
public static Schedule parseSchedule(String scheduleString)
Currently supports Daily- and FixedDelay-schedule on the formats:DAILY|hh:mm,hh:mm,...,hh:mm(|TIME_ZONE)
FIXED_DELAY|xxxs (xxx is number of seconds)
- Parameters:
scheduleString
-- Returns:
- A new schedule
- Throws:
Schedules.UnrecognizableSchedule
- When the scheduleString cannot be parsed
-
-