I’ve got a Cron job for fancontrol.sh running every 5mns, that used to run fine but stopped on March 15th for some reason.
It’s run as root.
root has shell access but no SSH access and No TrueNAS Access.
It’s using midclt to fetch disk temperature, and I noticed I needed an API Key after getting Not Authenticated error.
I’m not sure why it was working without before and why it is needed now. But from root shell, I can’t run midclt without an API Key.
I’ve provided fancontrol.sh with a way to get an API key from a user’s home located file.
Now everything works from root shell, I can also run the job successfully from the UI.
But it doesn’t run as expected every 5mns, at all.
logs are not useful, it shows that the job finishes immediately.
May 28 10:35:01 truenas CRON[316236]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
May 28 10:35:01 truenas CRON[316237]: (root) CMD (PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" midclt call cronjob.run 2 true > /dev/null 2> /dev/null)
May 28 10:35:02 truenas CRON[316236]: pam_unix(cron:session): session closed for user root
Unchecking Hide Standard Output in the UI doesn’t seem to make any difference: I can’t find any logs from the log execution itself.