schedule_toggle
Toggle scheduled systemd timers and cron jobs off or on, or run a timer now. Dry-run first, then apply reversible changes.
Instructions
Switch a scheduled job off / on, or run a timer now (the «Расписание» buttons): a systemd timer — disable --now / enable --now (+ reset-failed of its service), run = start its service; a cron job — the exact line in /etc/crontab, /etc/cron.d/* or a user crontab is commented out with «#mia-off » (enable removes the marker; a copy of the file goes to /root/mia-backup first). Reversible.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | inventory host | |
| unit | No | the timer (for timers) | |
| apply | No | false (default) = dry run: show what will happen on which hosts and a planHash. true = run it; needs planHash | |
| action | Yes | disable / enable, or run a timer now | |
| cronFile | No | cron: the file with the line | |
| cronLine | No | cron: the exact line (as fleet_schedule shows it) | |
| cronUser | No | cron: whose crontab (instead of a file) | |
| planHash | No | planHash from the dry run of the very same call, good for one apply; refused if targets or their state changed since |