I've added a job to root's crontab
# crontab -l | tail -n 1
*/3,13,29,43 * * * * /root/bin/check_network.sh
#
However, it appears to be running as my normal user, rwb.
The rwb account (not the root account) is getting mail about the job failing, and it's failing because
/root/bin/check_network.sh: line 26: iw: command not found
But of course iw is at /use/sbin/iw wchich is on root's $PATH but not rwb's.
What's going on?! How can I run my root cron job?
Update
Changingthe command from iw to /usr/sbin/iw seems to have got it working, so there must be some difference in the $PATH when cron is running compared to a normal bash window.