cronix


Scheduling

Module responsible for managing the job schedules.

Functions and values

Function or valueDescription
addTrigger (state, params')
Signature: (state:ScheduleState * params':ScheduleParams) -> Result<ScheduleState,string>

Adds the job to the trigger.

canAddTrigger (state, params')
Signature: (state:ScheduleState * params':ScheduleParams) -> Result<(ScheduleState * ScheduleParams),string>

Checks if a job trigger can be added.

createTrigger (name, expr, callback)
Signature: (name:TriggerName * expr:CronExpr * callback:JobCallback) -> ITrigger

Creates the job trigger

disableTrigger (state, name)
Signature: (state:ScheduleState * name:TriggerName) -> Result<ScheduleState,string>

Stops given job. This method performs job existance check, stops the job and logs the output result.

enableTrigger (state, name)
Signature: (state:ScheduleState * name:TriggerName) -> Result<ScheduleState,string>

Starts given job. This method performs job existane check, starts the job and logs the output result.

fireTrigger (state, name)
Signature: (state:ScheduleState * name:string) -> Result<ScheduleState,string>

Fires given trigger.

fireTriggerR (state, name)
Signature: (state:ScheduleState * name:TriggerName) -> Result<ScheduleState,string>

Fires given job. This method performs job existane check, starts the job and logs the output result.

removeTrigger (state, name)
Signature: (state:ScheduleState * name:string) -> Result<ScheduleState,string>

Removes given trigger.

reply reply msg
Signature: reply:AsyncReplyChannel<'a> -> msg:'a -> unit
Type parameters: 'a

Replies the message

scheduleJob (state, params')
Signature: (state:ScheduleState * params':ScheduleParams) -> Result<ScheduleState,string>

Schedules given job. This method performs cron expression validation, job existance check, job adding and logs the output result.

startTrigger (state, name)
Signature: (state:ScheduleState * name:string) -> Result<ScheduleState,string>

Starts given trigger.

stopTrigger (state, name)
Signature: (state:ScheduleState * name:string) -> Result<ScheduleState,string>

Stops given trigger execution.

terminateTrigger (state, name)
Signature: (state:ScheduleState * name:string) -> Result<ScheduleState,string>

Fires given trigger.

terminateTriggerR (state, name)
Signature: (state:ScheduleState * name:TriggerName) -> Result<ScheduleState,string>

Fires given job. This method performs job existane check, starts the job and logs the output result.

triggerExists (state, name)
Signature: (state:ScheduleState * name:string) -> Result<(ScheduleState * string),string>

Checks if given job exists.

unscheduleJob (state, name)
Signature: (state:ScheduleState * name:TriggerName) -> Result<ScheduleState,string>

Unschedules given job. This method performs job existance check, job removal and logs the output result.

validateExpr (state, params')
Signature: (state:ScheduleState * params':ScheduleParams) -> Result<(ScheduleState * ScheduleParams),string>

Validates the job cron expression

Fork me on GitHub