Skip to main content

Cron jobs

One of the advanced, but still essential, settings for YAFFA is the configuration of cron jobs. Cron jobs are scheduled tasks that run at specific intervals. YAFFA uses cron jobs to perform various tasks, such as

Setting up cron jobs depends on your server environment. The generic guideline is available in the Laravel task scheduling documentation.

Which instance runs the tasks​

The tasks above only run on the instance where RUNS_SCHEDULER is enabled. Enable it on exactly one instance: if none has it, the daily tasks never run, and if several have it, tasks run more than once (for example, users could receive duplicate reminder emails). In the Docker Compose setup, this is already taken care of: the scheduler container has it enabled, and the app container does not. See advanced configuration.

Queue worker and emails​

Some of the tasks dispatch queued jobs. A queue worker needs to be running for them to be processed, and the reminder emails sent by the AI document cleanup also need working outgoing email.