On unix (at least linux) you can run a script with an empty environment like this:
env -i path/to/script This way you can test on the shell what goes wrong. I do all the set up in .bashrc an and run the cron job like this: 0 * * * . $HOME/.bashrc; $HOME/.../script HTH, Thomas [EMAIL PROTECTED] schrieb: > i have a python script which works smooth for me in command line. > but now it cannot work in cron job. > > path: /home/data > script: test.py > it works as i type : python test.py > > now i wirte a shell script as below(test.sh): > cd /home/data > python test.py > > so when i run test.sh, it is ok. > > but when i set a cron job to run this shell, i always get this error > of cannot import modules, i am sure it is nothing about modules > missing, it only becuse i run it under script. > > can somebody help me, thanks! > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---