Citrine v0.1.11 Citrine.Job View Source
Link to this section Summary
Functions
Struct that describes a job. Must specify a unique :id
, a :schedule
using
cron syntax, and a task. If :extended_syntax
is set to true
, the schedule
will be parsed as extended cron syntax by Crontab.CronExpression.Parser
.
Link to this section Types
Link to this section Functions
Struct that describes a job. Must specify a unique :id
, a :schedule
using
cron syntax, and a task. If :extended_syntax
is set to true
, the schedule
will be parsed as extended cron syntax by Crontab.CronExpression.Parser
.
Example
iex(1)> job = %Citrine.Job{
...(1)> id: "my-job-id",
...(1)> schedule: "* * * * * *",
...(1)> task: fn -> nil end,
...(1)> extended_syntax: true
...(1)> }