Skip to content

feat: run the scheduled jobs one after another from 10:00 on weekdays - #67

Merged
Bilb merged 2 commits into
mainfrom
feat/weekday-queue
Oct 4, 2026
Merged

Bilb merged 2 commits into
mainfrom
feat/weekday-queue

Conversation

@Bilb

@Bilb Bilb commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

Moves github-prs-digest, zendesk-digest, crowdin-sync, snode-list and crowdin-duplicates onto one weekday queue, run one at a time from 10:00 Australia/Melbourne. session-ops-silence keeps its hourly timer.

How

  • [queue] in jobs.toml: the schedule and the order. A queued job takes no schedule of its own; the registry refuses one, an unknown name or a duplicate.
  • session-ops-queue.timer starts session-ops-queue.service, a oneshot that Wants= each ready queued job. install.sh rebuilds session-ops-queue.service.wants/ from the jobs whose env files have content, disables the old per-job timers of queued jobs, and enables the queue timer.
  • Each queued job's generated drop-in gets After= the job before it. For oneshot units that serialises them, and since it is ordering only, a failed job does not stop the next. Checked on systemd with throwaway user units: strict a → b → c, a failing, and a second start of the anchor re-runs all three.
  • The silence checker watches queued jobs too, and its alert points at session-ops-queue.timer for them. Their max_age_hours is 80: the 72 h weekend (73 h in April) plus every job ahead running to its timeout (5 h 15 in all).
  • session-ops list --queued prints the order.

Behaviour changes

  • crowdin-sync: weekly Monday 13:00 → every weekday, so the Android and iOS pull requests refresh daily.
  • snode-list, crowdin-duplicates: daily → weekdays.
  • github-prs-digest: 09:30 → first in the 10:00 queue.

Deploying

git -C /opt/session-ops pull && /opt/session-ops/deploy/install.sh, then systemctl list-timers 'session-ops*' should list only the queue and silence timers, and ls /etc/systemd/system/session-ops-queue.service.wants/ the five jobs.

A newly enabled timer has no last run to catch up, so a deploy after a day's 10:00 skips that day's queue; start any job that matters by hand.

Bilb added 2 commits October 5, 2026 08:49
A [queue] in jobs.toml replaces the per-job timers of github-prs-digest,
zendesk-digest, crowdin-sync, snode-list and crowdin-duplicates. One
session-ops-queue.timer, Mon..Fri 10:00 Australia/Melbourne, starts an anchor unit
that Wants= each ready queued job; each job's drop-in orders it After= the one
before, so they run in turn and a failure does not hold up the rest.

crowdin-sync moves from weekly to every weekday, snode-list and crowdin-duplicates
from daily to every weekday; their max_age_hours become the weekend gap plus the
queue's timeouts. session-ops-silence keeps its own hourly timer.
install.sh links only the ready queued jobs into the queue, and After= orders
nothing against a unit that is not being started. With only the previous job
named, an empty env file in the middle of the queue let the job after it run
alongside the ones before. Naming every job ahead keeps them one at a time
whichever subset is ready.

Also drops the last weekly/daily wording for crowdin-sync and
crowdin-duplicates, and says in the deploy README to re-run one job by its
own service, since starting the queue again re-runs the jobs already done.
@Bilb
Bilb merged commit cea1891 into main Oct 4, 2026
3 checks passed
@Bilb
Bilb deleted the feat/weekday-queue branch October 4, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant