I have a virtual server (debian) and the clock fails to sync from time to time (probably because i save/restore state with vboxheadlesstray).
To fix this issue I run
dpkg-reconfigure ntp && ntpq -p, it works when I run it as root, but doesn't work with cron. I have added it in
crontab -e (as root user) and is using this line:
1 * * * * dpkg-reconfigure ntp && ntpq -p > /dev/null 2>&1
My ordinary user user get mail about it saying
/bin/sh: 1: dpkg-reconfigure: not found, why is my ordinary user getting the mail and not root and what do I need to change to make it work?