Hello.
I am testing the following under root account
I have written a shell script which is in /root/bin directory.
The scrpit is named : test_temp
This script use nvclock program to get actual temperature and then fix the fan speed accordingly using nvclock function. By the way the script put a line in my log file /var/log/test_temp.log
Starting this shell script from a terminal and from any directory, in root session, run perfectly.
It manage correctly the fan speed and put good informations in my log file.
In crontab, I have set this line :
*/5 * * * * root /root/bin/test_temp >/dev/null 2>&1
Effectively :
1°) the script is run every five minutes ( timestamp in /var/log/test_temp.log).
2°) good information are put in my log file /var/log/test_temp.log
3°) I get the following message in /var/log/message every five minutes (rsyslog timestamp) :
==>>> 2011-05-23T23:40:01.613326+02:00 {linux-srv} {SVRTY: 6} {TAG: /usr/sbin/cron[12234]:}
…{MSG:} (root) CMD ( /root/bin/test_temp >/dev/null 2>&1)
4°) the call to nvclock function have no effect. Fanspeed is unchanged.
following the thread :
cron job not running because of pam?
I have changed /etc/pam.d/cron to :
auth required pam_rootok.so
account required pam_localuser.so
session required pam_loginuid.so
with no effect.