get_scheduled_jobs reads every crontab in /etc/crontabs in one round trip
as root, with the time zone from UCI and each crontab's package from opkg;
manage_scheduled_job enables, disables or runs one now; put_ and
delete_scheduled_job write and remove an application's own job as marked
lines in the user's crontab. BusyBox crond has no /etc/crontab, cron.d,
run-parts, anacron or systemd, so none is read.
OpenWrt's BusyBox differs from what the POSIX mixin assumes, so a few
steps are the driver's own:
- crontab -l says only "can't open" for a missing crontab, as for an
unreadable one: the file is read directly, a missing one is empty, and
one that cannot be read is never written.
- crontab FILE exits 0 when it could not write: every write is read back.
- cron is enabled and restarted after each write; OpenWrt does not start
crond while /etc/crontabs is empty.
- crond has no special times: aliases are written as five fields and
@reboot is refused.
- crond hands the whole command to sh and takes only SHELL and PATH from
the crontab, so a run now does the same (% is no stdin).
- there is no su and no timeout before 25.x: another user's job runs
through start-stop-daemon -c, and the run is bounded by timeout only
where the router has it.
Every write changes only the job's own line, so the reboot failback line
in /etc/crontabs/root stays as it is.
Requires napalm-device-types 4.26.0.
Closes#32