The file packages/api/src/jobs/server.js
is the entry point to a standalone Node application that runs independently of the API server. In a LiteFarm deployment, this "jobs scheduler" runs as a native Node process (no Docker container) behind an Nginx reverse proxy. It monitors a local Redis-based queue for incoming certfiication export jobs. These jobs are initiated by the user in the frontend, causing the API to extract the necessary data and create the queue entries.
The scheduler takes job data from the queue and generates several Excel spreadsheets in the format needed by certifying bodies. These spreadsheets, along with relevant documents that the user has uploaded to storage buckets, are packaged into a single .zip file, and the user receives an email with a link to download this archive.