Scheduled jobs¶
Recurring jobs run by the background worker (qcluster). They are
created or updated by python manage.py setup_schedules, which is
safe to run again at any time, and they do nothing unless the worker
is running.
Times are in the firm's time zone, the TIME_ZONE variable in
config/.env.
| Job | When | What it does |
|---|---|---|
daily-digest |
Daily at 07:00 (0 7 * * *) |
Emails each active user who has the digest switched on a summary of overdue, today's and upcoming items. |
calendar-sync |
Every 2 minutes (*/2 * * * *) |
Two-way Google Calendar sync: pushes pending local changes and deletions, then pulls changes from Google. Does nothing until Google Calendar is connected. |
drive-sync |
Every minute (* * * * *) |
Incremental Google Drive sync of linked matter folders through the Drive Changes API. Does nothing until Google Drive is connected. |
drive-sync-nightly-full |
Daily at 03:30 (30 3 * * *) |
Full re-crawl of every linked Drive folder, to catch anything the incremental sync missed. |
gmail-sync |
Every 2 minutes (*/2 * * * *) |
Syncs labelled Gmail messages onto their mapped matters, across every connected mailbox. Does nothing until a mailbox is connected and a label is linked to a matter. |
gmail-sync-weekly-full |
Monday at 03:15 (15 3 * * 1) |
Full Gmail re-sync of every linked label. |
chat-purge-weekly |
Sunday at 03:00 (0 3 * * 0) |
Deletes AI chat history for matters that have been closed for longer than CHAT_RETENTION_DAYS (180 by default; 0 keeps chats indefinitely). |
payments-reconcile |
Hourly at 15 minutes past (15 * * * *) |
Asks the payment processor for the current state of every online payment and trust deposit still in flight, and settles, confirms or reverses it. The backstop for a webhook that never arrived. |
What each job runs¶
| Job | Function |
|---|---|
daily-digest |
apps.tasks.digest.send_daily_digest |
calendar-sync |
apps.calendar.sync.scheduled_sync |
drive-sync |
apps.drive.google.scheduled_sync |
drive-sync-nightly-full |
apps.drive.google.scheduled_sync_full |
gmail-sync |
apps.mail.google.scheduled_sync |
gmail-sync-weekly-full |
apps.mail.google.scheduled_sync_full |
chat-purge-weekly |
apps.case.ai.purge.scheduled_purge_closed_chats |
payments-reconcile |
apps.invoicing.pay.reconcile.poll_pending |