Schedule

cronic.Schedule
See theSchedule companion object
case class Schedule(yearFilter: List[Filter], monthFilter: List[Filter], dayFilter: List[Filter], hourFilter: List[Filter], minuteFilter: List[Filter], secondFilter: List[Filter], dayOfWeekBitset: Int)

Specification of a recurring event, based on set of date and time filters.

A schedule is considered to happen at a point in time when all its filters are satisfied.

Schedules work up to a precision of seconds.

Notes:

  • an empty filter is equivalent to '*' in cron
  • contrary to POSIX cron, if weekday and day are set then both must be fulfilled

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def next(now: LocalDateTime): LocalDateTime

Find the next time that this schedule will match.

Find the next time that this schedule will match.

Attributes

Throws:
IllegalArgumentException

if no suitable time could be found. This can happen if the schedule is in the past, or no matching time in the future could be predicted after multiple attempts.

def predict(now: LocalDateTime): Option[LocalDateTime]

Predict the next time that all filters of this schedule will be satisfied.

Predict the next time that all filters of this schedule will be satisfied.

Attributes

now

the current date and time

Returns:

None if the schedule is in the past, or no time could be predicted. Otherwise, the next time that the schedule will take place.

def predictUtc(now: Instant): Option[Instant]

Predict the next time that all filters of this schedule will be satisfied, as an instant in UTC.

Predict the next time that all filters of this schedule will be satisfied, as an instant in UTC.

Attributes

def predictions(now: LocalDateTime): LazyList[LocalDateTime]

The stream of all future predictions.

The stream of all future predictions.

Attributes

def predictionsUtc(now: Instant): LazyList[Instant]

The stream of all future predictions, as instants in UTC.

The stream of all future predictions, as instants in UTC.

Attributes

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
Any

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product