[Tutor] "IOError: [Errno 32] Broken pipe" when running python with cron (alternatives?)
karper12345 at yahoo.com
Sat Mar 27 13:45:23 CET 2010
I have made an extensive script that runs fine when started from the command line or IDLE.
When I try to run it with cron it keeps giving errors:
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
File "/usr/lib/python2.6/logging/__init__.py", line 1508, in shutdown
File "/usr/lib/python2.6/logging/__init__.py", line 754, in flush
IOError: [Errno 32] Broken pipe
The script has the following structure:
1. retrieves data from database 1
2. modifies the data
3. inserts the modified data in another database
In a previous script I solved this problem with directing the stdout and stderr to /dev/null, but doing this isn't possible because I use pickle and write some data to files. It seems to have anything to do with the stdout/stderr and cron, but after a lot of googling I don't have any clues how to fix this.
How can I solve this? Does anybody know how to solve this or is there a python-friendly alternative to cron that I can use.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor