Skip to content
Mike Perham edited this page Sep 28, 2023 · 4 revisions

Faktory Enterprise can enqueue jobs periodically by adding a TOML file to /etc/faktory/conf.d/cron.toml in production, or ~/.faktory/conf.d/cron.toml in development, with your set of cron jobs:

[[cron]]
  schedule = "*/5 * * * *"
  [cron.job]
    type = "FiveJob"
    queue = "critical"
    [cron.job.custom]
      foo = "bar"

[[cron]]
  schedule = "12 * * * *"
  [cron.job]
    type = "HourlyReport"
    retry = 3

[[cron]]
  schedule = "* * * * *"
  [cron.job]
    type = "EveryMinute"

Note the ability to configure the queue, retries and custom job elements. cron.toml is just a convention; you may have as many TOML files in /etc/faktory/conf.d as you wish, all [[cron]] elements will be merged together.

Faktory Enterprise will reload cron jobs (really all configuration) without shutting down if you send the HUP signal:

# systemd service
ExecReload=/bin/kill -HUP $MAINPID
> systemctl reload faktory

# docker container
> docker kill --signal=HUP <container>

Web UI

The Cron feature adds a tab to the Web UI so you can view the current Cron configuration.

Periodic Jobs Listing

cronui

Periodic Job Details and History

cronui