feat(scheduled-jobs): scheduled jobs on QTS's crontab (#17) #18

Merged
christianmanivong merged 2 commits from feature/scheduled-jobs into main 2026-11-03 08:20:28 +00:00
2 Commits
Author SHA1 Message Date
Christian Manivong 2a921fa72d chore(scheduled-jobs): require napalm-device-types 4.27.0
driver / standard (pull_request) Successful in 22s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 1m0s
driver / test (3.12) (pull_request) Successful in 1m7s
driver / lowest (pull_request) Successful in 29s
driver / test (3.13) (pull_request) Successful in 58s
driver / build (pull_request) Successful in 26s
driver / security (pull_request) Successful in 1m5s
CI / driver (pull_request) Successful in 2m48s
driver / publish (pull_request) Skipped
4.26.0 went out with the sshd drop-in change; the scheduled-jobs
contract is in 4.27.0.
2026-11-03 08:35:51 +01:00
Christian Manivong 2a4403101a feat(scheduled-jobs): scheduled jobs on QTS's crontab (#17)
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Failing after 56s
driver / test (3.12) (pull_request) Failing after 46s
driver / lowest (pull_request) Failing after 20s
driver / test (3.13) (pull_request) Failing after 47s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Failing after 1m4s
CI / driver (pull_request) Failing after 2m18s
driver / publish (pull_request) Skipped
napalm-linux now brings napalm-device-types' POSIX scheduled jobs, with
Debian's paths. On QTS they are wrong: the crontab that survives a boot
is /etc/config/crontab (admin's, no user field), crond runs a copy of
it, and a change made only through crontab is gone after the next boot.
BusyBox crond reads no /etc/crontab, cron.d, run-parts or anacron, and
there is no systemd.

QtsScheduledJobsMixin reads /etc/config/crontab as admin's and the other
users' crontabs from crond's spool in one round trip, and writes the
file first, then loads it and restarts crond. The firmware's own lines
are platform by a conservative command list and only run, until a real
box shows whether QTS leaves one switched off alone. An application's
job is marked lines in admin's crontab; a run is bounded without
timeout, which QTS's BusyBox cannot be relied on to have.

Requires napalm-device-types 4.26.0 and napalm-linux 0.16.0.

Closes #17
2026-11-03 05:47:32 +01:00