jubot.scheduler

Jubot scheduler.

->Scheduler

(->Scheduler cj entries)
Positional factory function for class jubot.scheduler.Scheduler.

collect

(collect ns-regexp)
Return sequence of public schedules in specified namespaces.

Params
  ns-regexp - A regular expression which specifies namespaces for searching schedules.
Return
  Sequence of schedules.

create-scheduler

(create-scheduler {:keys [entries], :as config-option})
Create the scheduler.

Params
  :entries - Sequence of schedules.
Return
  Scheduler component.

map->Scheduler

(map->Scheduler m__5869__auto__)
Factory function for class jubot.scheduler.Scheduler, taking a map of keywords to field values.

public-schedules

(public-schedules ns-regexp)
Return sequence of public schedule vars which matched SCHEDULE_REGEXP in specified namespaces.

Params
  ns-regexp - A regular expression which specifies namespaces for searching schedules.
Return
  Sequence of schedule vars.

schedule

(schedule cron-expr f)
Generate a schedule from a pair of cronj format string and function.

Params
  cron-expr - Cronj format string. http://docs.caudate.me/cronj/#crontab
  f         - A function with zero parameter.
Return
  A schedule function.

schedule->task

(schedule->task f)
Convert a schedule function to cronj task.

Params
  f - A schedule function.
Return
  A cronj task.

SCHEDULE_REGEXP

The regular expression for collecting schedules automatically.

schedules

(schedules & args)
Generate sequence of schedules from pairs of cronj format string and function.

Params
  args - Pairs of cronj format string and function.
Return
  Sequence of schedule functions.