I’m trying to use juju commands from the default user crontab but it doesn’t work if the user isn’t logged in .
The error is
/system.slice/cron.service is not a snap cgroup
Thanks for reaching out to us. Because of the way cgroups are used in snaps the execution of the juju needs to happen in the same slice as far as I am aware. The best and most modern way to achieve this would be to run juju from within a system timerd unit (https://www.freedesktop.org/software/systemd/man/latest/systemd.timer.html).
Please let us know if we can help constructing what this might look like for a local user.