Fleet.Cron (fleet v0.1.0)

Copy Markdown View Source

Lightweight recurring job scheduler for Fleet.

Evaluates cron expressions and interval expressions (@every 30s, @hourly, etc.) and dispatches jobs to their respective queues.

Example Configuration in Fleet.Supervisor

{Fleet,
 repo: MyApp.Repo,
 cron: [
   {"* * * * *", MyApp.Workers.MinuteWorker},
   {"@every 30s", MyApp.Workers.Heartbeat, args: %{"scope" => "all"}},
   {"@hourly", MyApp.Workers.CleanupWorker, queue: :maintenance}
 ]}

Summary

Functions

Returns a specification to start this module under a supervisor.

Starts the Fleet.Cron scheduler.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

Starts the Fleet.Cron scheduler.