In article <mailman.1801.1368883685.3114.python-l...@python.org>, Chris Angelico <ros...@gmail.com> wrote:
> On Sat, May 18, 2013 at 8:12 PM, Avnesh Shakya <avnesh.n...@gmail.com> wrote: > > avin@hp:~$ crontab -e > > then type - > > */2 * * * * python /home/avin/data/try.py > > > > You may need to put an explicit path to your Python interpreter. Type: > > $ which python > > and put that into your crontab. True. Somewhat more generally, jobs run under cron have a far more barren environment than most people realize. Or, looking at it a different way, most people don't even realize all the ways they depend on their environment being set up properly by the login process. If you've set things like PYTHONPATH, you won't have them set right for cron jobs unless you explicitly reset them in your crontab. It's often instructive to run something like "env > /tmp/xxx" under cron, and compare that to what you get when you run "env" at a command-line prompt. -- http://mail.python.org/mailman/listinfo/python-list