Let’s say I have an endpoint which returns a payload with a scheduling. Is there any way I can build a snap that performs reboot and shutdown based on that?
I have already built a snap using the solution suggested by @ogra and I could setup a systemd timer using this in the snapcraft.yaml command: bin/pwr_mgmt.sh daemon: simple plugs: - shutdown timer: mon-fri,04:00
However, I would like to setup systemd timer from inside the snap after making a call to the endpoint.