Audit scheduled job times for overlap #119

Closed
opened 2026-08-17 15:07:10 -04:00 by mysticalsoap · 2 comments
Owner

Bazarr recently moved to weekly Sunday batches, and a scheduled docker restart would want a low-traffic window too. Worth checking whether the full set of scheduled/batch jobs collides -- or confirming it doesn't matter.

Bazarr recently moved to weekly Sunday batches, and a scheduled docker restart would want a low-traffic window too. Worth checking whether the full set of scheduled/batch jobs collides -- or confirming it doesn't matter.
Author
Owner

Audit, 2026-10-08

Every scheduler in play, with measured durations (Dagu run history, systemd journal, node-exporter textfiles, Jellyfin/*arr task APIs). Times are host local (America/New_York) unless flagged.

Fixed-clock jobs

Time Job Measured duration
00:00 daily Dagu metadata median 5 min; 12–43 min on every night 09-08→09-19
00:00 daily Dagu docker-image-prune 0–14 s
00:00 every 6 h Dagu qbit-manage 8 s
00:00 every 2 h Dagu invidious-restart <5 s
00:00 monthly (1st) Dagu crowdsec-hub-update → restarts crowdsec 15–19 s
00:00 monthly (1st) Dagu ip2location → restarts traefik 12–14 s
00:00 daily host: shadow, logrotate (00:02), snapper-timeline (hourly on the hour) seconds
00:22–00:58 daily host plocate-updatedb; Mon 00:39 fstrim, Mon 00:54 btrfs-balance-external minutes, disk-bound
00:30 daily Dagu audiobookshelf-match 90 s (fixed wait)
~00:36 daily, drifting Jellyfin 24 h interval tasks (library scan, audio normalization, subtitle/lyric download, cache cleanup, LDAP sync); 12 h scan again at ~12:37 <1 min each
01:00 daily Seerr download-sync-reset; 01:30 every 7 d process-blocklisted-tags seconds
03:00 daily Seerr jellyfin-full-scan not measured, small library
Sun 03:00 Bazarr backup seconds
03:15 daily restic backup (pg_dumpall ×N, btrfs snapshot, restic) 10 s
04:00 / 04:30 daily Seerr radarr-scan / sonarr-scan seconds
Sun 04:00 Bazarr full Sonarr+Radarr sync not measured
05:00 daily Seerr availability-sync, image-cache-cleanup seconds
Sun 05:30 restic check (5 % read) 2 s
Mon 06:00 Dagu image-scan 13–148 s
08:00 daily Renovate 2 min 16 s
20:00 daily (00:00 UTC) Profilarr quality-profile sync; Sat 20:00 media-management, delay-profile, cleanup 1–4 s
20:00–23:30 daily (UTC clock, see below) Jellyfin daily triggers: trim playback db 20:00, chapter images 22:00, trickplay + tag cache + StarTrack export + Seerr→Jellyfin watchlist 23:00, Jellyfin→Seerr watchlist 23:30, Sat 23:00 playback-reporting backup <1 min each
23:45 daily Mealie daily housekeeping seconds

Interval-only (no fixed clock, nothing to collide with)

Radarr/Sonarr/Lidarr/Prowlarr tasks (RSS 15–30 min, refresh 12–24 h, weekly backup) all count from app start, longest 15 s. Bazarr wanted-search 6 h, upgrade 12 h, same. SMART metrics hourly, goroutine watch 5 min, Vaultwarden purges (UTC, seconds), Forgejo cron at defaults (midnight local, no overrides), Audiobookshelf backups off, qBittorrent scheduler off, Navidrome has no scheduled scan.

Not checked: the VPS (ssh key isn't in the agent). ssh vps systemctl list-timers --all closes that.

Verdict

Nothing collides in a way that costs anything. Every job is seconds except metadata (minutes) and nothing waits on anything else. Three things worth doing anyway:

  1. Jellyfin runs on UTC. Its environment: block (NVIDIA vars) replaces x-common's, so TZ never reaches it: the exact pitfall the navidrome block comments on. Result: the "overnight" daily tasks (trickplay generation, chapter extraction, StarTrack export, both watchlist syncs) fire 20:00–23:30 local, during viewing hours. Fix: re-list TZ (and PUID/PGID) under jellyfin's environment:; the daily triggers then land 00:00–03:30 local. Costs one Jellyfin recreate.
  2. Monthly 00:00 on the 1st restarts traefik and crowdsec in the same second, alongside the four daily midnight DAGs. Loki shows no traefik complaint about it on 10-01 (crowdsec's LAPI was back 33 s after the restart), so this is hygiene, not a fix: stagger ip2location to 10 0 1 * * and crowdsec-hub-update to 20 0 1 * * so the public-facing restart never coincides with anything else.
  3. audiobookshelf-match.yaml's comment claims 00:30 keeps clear of metadata. It did not on 12 nights in September (metadata ran to 00:43). Harmless, the two talk to different apps, but the comment should say "shares the container, not the apps" rather than promise separation.

Also: Jellyfin's interval tasks re-anchor to whenever Jellyfin last restarted. A daytime just deploy after a Renovate merge moves the library scan, audio normalization and subtitle downloads to that hour of the day until the next restart. Switching those to a daily trigger in Jellyfin's UI makes them predictable; a settings choice, not a repo one.

Scheduled docker restart (#117, on hold): when it lands, 03:30–03:55 is the clean window, any day. Backup finishes by 03:16, Jellyfin's cluster is done by 01:00, Seerr's scans are seconds, Bazarr's Sunday sync is 04:00. Sunday 05:30 (restic check) is the only other weekly event to stay clear of.

## Audit, 2026-10-08 Every scheduler in play, with measured durations (Dagu run history, systemd journal, node-exporter textfiles, Jellyfin/*arr task APIs). Times are host local (America/New_York) unless flagged. ### Fixed-clock jobs | Time | Job | Measured duration | |---|---|---| | 00:00 daily | Dagu `metadata` | median 5 min; 12–43 min on every night 09-08→09-19 | | 00:00 daily | Dagu `docker-image-prune` | 0–14 s | | 00:00 every 6 h | Dagu `qbit-manage` | 8 s | | 00:00 every 2 h | Dagu `invidious-restart` | <5 s | | 00:00 monthly (1st) | Dagu `crowdsec-hub-update` → restarts crowdsec | 15–19 s | | 00:00 monthly (1st) | Dagu `ip2location` → restarts traefik | 12–14 s | | 00:00 daily | host: `shadow`, `logrotate` (00:02), `snapper-timeline` (hourly on the hour) | seconds | | 00:22–00:58 daily | host `plocate-updatedb`; Mon 00:39 `fstrim`, Mon 00:54 `btrfs-balance-external` | minutes, disk-bound | | 00:30 daily | Dagu `audiobookshelf-match` | 90 s (fixed wait) | | ~00:36 daily, drifting | Jellyfin 24 h interval tasks (library scan, audio normalization, subtitle/lyric download, cache cleanup, LDAP sync); 12 h scan again at ~12:37 | <1 min each | | 01:00 daily | Seerr `download-sync-reset`; 01:30 every 7 d `process-blocklisted-tags` | seconds | | 03:00 daily | Seerr `jellyfin-full-scan` | not measured, small library | | Sun 03:00 | Bazarr backup | seconds | | 03:15 daily | restic backup (pg_dumpall ×N, btrfs snapshot, restic) | 10 s | | 04:00 / 04:30 daily | Seerr `radarr-scan` / `sonarr-scan` | seconds | | Sun 04:00 | Bazarr full Sonarr+Radarr sync | not measured | | 05:00 daily | Seerr `availability-sync`, `image-cache-cleanup` | seconds | | Sun 05:30 | restic check (5 % read) | 2 s | | Mon 06:00 | Dagu `image-scan` | 13–148 s | | 08:00 daily | Renovate | 2 min 16 s | | 20:00 daily (00:00 UTC) | Profilarr quality-profile sync; Sat 20:00 media-management, delay-profile, cleanup | 1–4 s | | 20:00–23:30 daily (UTC clock, see below) | Jellyfin daily triggers: trim playback db 20:00, chapter images 22:00, trickplay + tag cache + StarTrack export + Seerr→Jellyfin watchlist 23:00, Jellyfin→Seerr watchlist 23:30, Sat 23:00 playback-reporting backup | <1 min each | | 23:45 daily | Mealie daily housekeeping | seconds | ### Interval-only (no fixed clock, nothing to collide with) Radarr/Sonarr/Lidarr/Prowlarr tasks (RSS 15–30 min, refresh 12–24 h, weekly backup) all count from app start, longest 15 s. Bazarr wanted-search 6 h, upgrade 12 h, same. SMART metrics hourly, goroutine watch 5 min, Vaultwarden purges (UTC, seconds), Forgejo cron at defaults (midnight local, no overrides), Audiobookshelf backups off, qBittorrent scheduler off, Navidrome has no scheduled scan. Not checked: the VPS (ssh key isn't in the agent). `ssh vps systemctl list-timers --all` closes that. ### Verdict Nothing collides in a way that costs anything. Every job is seconds except `metadata` (minutes) and nothing waits on anything else. Three things worth doing anyway: 1. **Jellyfin runs on UTC.** Its `environment:` block (NVIDIA vars) replaces `x-common`'s, so `TZ` never reaches it: the exact pitfall the navidrome block comments on. Result: the "overnight" daily tasks (trickplay generation, chapter extraction, StarTrack export, both watchlist syncs) fire 20:00–23:30 local, during viewing hours. Fix: re-list `TZ` (and `PUID`/`PGID`) under jellyfin's `environment:`; the daily triggers then land 00:00–03:30 local. Costs one Jellyfin recreate. 2. **Monthly 00:00 on the 1st restarts traefik and crowdsec in the same second**, alongside the four daily midnight DAGs. Loki shows no traefik complaint about it on 10-01 (crowdsec's LAPI was back 33 s after the restart), so this is hygiene, not a fix: stagger `ip2location` to `10 0 1 * *` and `crowdsec-hub-update` to `20 0 1 * *` so the public-facing restart never coincides with anything else. 3. **`audiobookshelf-match.yaml`'s comment claims 00:30 keeps clear of `metadata`.** It did not on 12 nights in September (metadata ran to 00:43). Harmless, the two talk to different apps, but the comment should say "shares the container, not the apps" rather than promise separation. Also: Jellyfin's interval tasks re-anchor to whenever Jellyfin last restarted. A daytime `just deploy` after a Renovate merge moves the library scan, audio normalization and subtitle downloads to that hour of the day until the next restart. Switching those to a daily trigger in Jellyfin's UI makes them predictable; a settings choice, not a repo one. **Scheduled docker restart (#117, on hold):** when it lands, 03:30–03:55 is the clean window, any day. Backup finishes by 03:16, Jellyfin's cluster is done by 01:00, Seerr's scans are seconds, Bazarr's Sunday sync is 04:00. Sunday 05:30 (restic check) is the only other weekly event to stay clear of.
Author
Owner

VPS checked by the user: only stock Debian timers (apt-daily 16:45 UTC, apt-daily-upgrade 06:14 UTC, logrotate, man-db, dpkg-db-backup at 00:00 UTC, weekly fstrim and e2scrub). Nothing from the stack, no reboot timer. Follow-ups are in the PR linked below.

VPS checked by the user: only stock Debian timers (apt-daily 16:45 UTC, apt-daily-upgrade 06:14 UTC, logrotate, man-db, dpkg-db-backup at 00:00 UTC, weekly fstrim and e2scrub). Nothing from the stack, no reboot timer. Follow-ups are in the PR linked below.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mysticalsoap/docker#119
No description provided.