PDA

View Full Version : Run python script with cron with my user environment



tigerlight
01-21-2011, 11:18 AM
How can I run a cron job as a specific user? I have a python script that works with my user environment. When I run it as a cron job it uses different env that doesn't have the appropriate python packages installed.

I review the forum and saw an approach that used sudo -u but my account does not allow me to run sudo.

fizixgeek
09-07-2011, 12:13 AM
I'm successfully running a python script, but I specify the full path to python: /usr/bin/python2.6