Python and Cron

Greg Lindstrom gslindstrom at gmail.com
Fri Sep 7 13:24:42 EDT 2007


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 works great,
but when I schedule the job to run from the crontab file, the original file
is created and populated, but the rename fails.  I am using full paths for
both the original and destination file, and run the command line version
after I 'su' to the production account (named 'edith').  I am told by my
sysadmin that the cron jobs run as edith as well, so he does not think it is
a permission issue (he points out the original file is being created and
populated as expected...the rename fails)

Have any of you dealt with anything like this?  It really has me scratching
my head.

Thanks,
--greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070907/511ebf8f/attachment.html>


More information about the Python-list mailing list