I have created a --user service in systemd such that a non privileged user can manage a service. This works well. I wanted to restart the service at a fixed given time of day, so i created a cron job in the users crontab.
Strangely this does not work. The user can restart the service if they run:
systemctl --user restart myservice.service
However running this from the crontab does not restart the service. Does anyone know why?
This is running on Ubuntu 16.04.