cron -> python -> jpython -> no dice
Alex Martelli
aleaxit at yahoo.com
Mon Apr 16 03:39:57 EDT 2001
"Thomas Duterme" <thomas at madeforchina.com> wrote in message
news:mailman.987397822.26056.python-list at python.org...
> Argh...
>
> Ok, I feel thoroughly rejected by cron. I have a python job
> which inside the script calls another jpython script. (the
> jpyton connects to oracle and does some Db-fu)
>
> Now, when I call from the command line, I'm fine.
> Everything works well and the jpython executes properly.
> When I call from cron, the python executes, but no dice on
> the jpython.
>
> I call the jpython as follows within the .py:
>
> os.system('/usr/local/bin/jpython /var/script/db_up.py')
>
> Any ideas folks?
Looks like the system environment may not be set right
for you when shelling out with os.system from a cron job.
PATH and CLASSPATH are likely culprits. To check this out,
call the env program, redirecting its output to a log file,
right before you try to run jpython; do the same from the
interactive session where things are working; and verify
the differences between the environment in the two cases.
Alex
More information about the Python-list
mailing list