How do you execute external programs from Python?

michael michael.bierenfeld at web.de
Fri Nov 26 05:14:20 EST 2004


> > Here is my crontab entry:
> > 
> > 30 * * * * python -c "import os; os.chdir('/home/alpha/mymusic/P2/Jazz/');
> > import KKJZ"

Hi,

if cron is running as root say

30 * * * * "su - user; script.sh"

su - user means that .profile, .bash-profile etc is read. I think its
an "Environmental" Problem



More information about the Python-list mailing list