#4254·k9s

Suspend/Resume on CronJobs ignores marked rows (Trigger honors them)

Author: iserdardursunCreated Sep 26, 2026Updated Sep 26, 2026

Describe the bug

In the CronJob view I can mark several rows with Space. Trigger (t) and delete act on all marked rows, but Suspend/Resume (s) only acts on the row under the cursor and silently ignores the marks.

To Reproduce

  1. Create a few CronJobs: kubectl create cronjob cj-a --image=busybox --schedule="*/5 * * * *" -- date, and the same for cj-b.
  2. In k9s, go to :cronjobs.
  3. Mark cj-a and cj-b with Space.
  4. Press t. The dialog says "Trigger 2 CronJobs?".
  5. Cancel, then press s. The dialog only lists the cursor row (default/cj-b).
  6. Confirm. Only cj-b is suspended (kubectl get cronjob shows cj-a still False).

Expected behavior

s acts on all marked rows, like t. It would show "Suspend 2 CronJobs" or "Resume 2 CronJobs".

Additional context

The code path is toggleSuspendCmd in internal/view/cronjob.go. It uses GetSelectedItem() while triggerCmd uses GetSelectedItems(), even though both are registered in the same aa.Bulk(...) block.

I have a working fix. For a mixed selection (some suspended, some not) I chose "resume only if all are suspended, otherwise suspend all". Happy to change that if you'd prefer different semantics, and I can open a PR if you're fine with the direction.

Versions

  • OS: Ubuntu 26.04 (WSL2)
  • K9s: built from master (9ef1901)
  • K8s: v1.36.4+k3s1 (k3s)