Re: Python and Cron

2007-09-08 Thread Amit Khemka
On 9/8/07, Greg Lindstrom <[EMAIL PROTECTED]> wrote: > # run client pricing at 0215 (p) Monday-Friday > 15 2 * * 1-5 cd /m01/edith/src && /usr/bin/python /m01/edith/src/driver.py > --paid-date yesterday --jobname professional >> > /m01/edith/stdout/ecomppo.stdout 2&>1 "2&>1", Is that a typo ? It

Re: Python and Cron

2007-09-07 Thread Shawn Milochik
Any chance your import statements aren't coming in properly due to something in your environment in Python that's not being inherited by your cron job? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Cron

2007-09-07 Thread Greg Lindstrom
> "Shawn Milochik" <[EMAIL PROTECTED]> > Could you send the output of "crontab -l" and the script you're running? > > It's probably an environment issue of some kind, but it's hard to say > what blindly. # run client pricing at 0215 (p) Monday-Friday 15 2 * * 1-5 cd /m01/edith/src && /usr/bin/py

Re: Python and Cron

2007-09-07 Thread Greg Lindstrom
> Can you post the Python script? Not the whole thing; it's quite long. But here's the relevant parts. We're using the ado database interface into postgres (that's what the results.EOFis all about) output_file = file(output_path, 'w') # output_path = /my_path/data/work/my_file.txt while not

Re: Python and Cron

2007-09-07 Thread Paul McNett
Greg Lindstrom wrote: > This may be more of a Linux question, but I'm hoping some of you may be > able to help me. > > I have a python (2.4) routine running on Gentoo Linux. It creates a > file and, after the file is complete, renames the file using the > os.rename() command. When I run the f

Re: Python and Cron

2007-09-07 Thread Shawn Milochik
Could you send the output of "crontab -l" and the script you're running? It's probably an environment issue of some kind, but it's hard to say what blindly. -- http://mail.python.org/mailman/listinfo/python-list

Python and Cron

2007-09-07 Thread Greg Lindstrom
This may be more of a Linux question, but I'm hoping some of you may be able to help me. I have a python (2.4) routine running on Gentoo Linux. It creates a file and, after the file is complete, renames the file using the os.rename() command. When I run the file from the command line everything

Re: Wits end with Python and cron

2005-09-28 Thread Fredrik Lundh
I wrote: > if you're running a python program directly from cron and I should really learn to tell the difference between a shell script and a python program (but hey, this is comp.lang.python). see jepler's reply for the quickest way to fix your problems. -- http://mail.python.org/mailma

Re: Wits end with Python and cron

2005-09-28 Thread Fredrik Lundh
Justin Delvecchio wrote: > I've researched this problem for the last few days. Say I have > the following script that I execute from cron on linux. Yes, the > following runs quite fine from the command line: > And the error I continually get is: > > Traceback (most recent call last): > File "

Re: Wits end with Python and cron

2005-09-28 Thread jepler
You need to "export" the variables. otherwise, they exist only in the shell, not in the processes it starts. Jeff pgplXE5VuF44A.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Wits end with Python and cron

2005-09-28 Thread Justin Delvecchio
I’ve researched this problem for the last few days.  Say I have the following script that I execute from cron on linux.  Yes, the following runs quite fine from the command line:   #! /bin/sh # /u01/app/oracle/product/10.1.0/Db_1/lib source /home/oracle/.bashrc PYTHONPATH=/usr/lib/pyth