I am using redhat linux platform
I was wondering why when I use python script inside crontab to run every 2 minutes it won't work even though when I do monitor the crond logs using
tail /etc/sys/cron it shows that it called the script , tried to add the path of python , [ I am using python2.6 -- so the path would be /usr/bin/python2.6 ]
the crontab -e [tried user and root same problem ]
*/2 * * * * /usr/bin/python2.6 FULLPATH/myscript.py
Thank you all guys , but I did a little research and I have found a solution , first you have to test sudo python to see if it works with the module , if not you have to do alias for the sudo you put it inside /etc/bashrc [ to make it system wide alias ] , alias sudo='sudo env PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH ORACLE_HOME=$ORACLE_HOME TNS_ADMIN=$TNS_ADMIN'
Then you have to change crontab to call a script to assign these values to the variables , using source /the script && /usr/bin/python script.py
How to modify crontab to run python script?