vura.sync.scheduler

defschedule

macro

(defschedule schedule-name mappings)
Returns instance of StaticSchedule

dispatcher-life

(dispatcher-life instance)
Controls schedule lifecycle.

If job was started and successfuly finished
befor next valid timestamp than job is restarted.

If job encounterd an error than error is loged,
and job is restarted anyway.

If job didn't finish in time than WARN is logged
and no actions are taken.

DispatcherActions

protocol

members

start-dispatching!

(start-dispatching! this)
Function activates dispatcher.

stop-dispatching!

(stop-dispatching! this)
Function deactivates dispatcher.

make-dispatcher

(make-dispatcher schedule)

make-schedule

(make-schedule & jobs)
Functions returns Schedule instance. Jobs
are supposed to be argument of 3ies.

job-name, Job., CRON-schedule

ScheduleInfo

protocol

members

get-job

(get-job this job-name)
Returns Job. instance of job-name

get-job-phases

(get-job-phases this)
Get current job phases

get-jobs

(get-jobs this)
Get all scheduled jobs names

get-schedule

(get-schedule this job-name)
Returns CRON string for given job-name

get-schedules

(get-schedules this)
List CRON schedules

SchedulerActions

protocol

members

add-job

(add-job this job-name job schedule)
Function adds Job. to this schedule

remove-job

(remove-job this job-name)
Function removes Job. form this schedule

replace-job

(replace-job this job-name new-job schedule)
Function replaces Job. to this schedule

reschedule-job

(reschedule-job this job-name schedule)
Function reschedules Job. with new schedule