[Tutor] python and cron

John Hazen john@hazen.net
Tue Feb 18 21:30:02 2003


On Tue, 18 Feb 2003, Timothy M. Brauch wrote:

> I checked my log and there are no errors and I don't get any
> errors emailed to me.  The script works fine from command line.
> 
> Here is part of my code:
> --------------------------------------------------------------
> #! /usr/bin/python
----^

Hmmm.  I don't think that space should be there.  When you invoke from
the command line, are you typing "python getipaddress.py" or
"./getipaddress.py"?  If the latter works, then it's probably a cron
issue.

> Here is the entry from crontab:
> -----------------------------------------------------------------
> 0 * * * * /var/ftp/getipaddress.py
> -----------------------------------------------------------------

That looks fine.  If you edited the crontab directly (using vi instead
of "crontab -e"), you'll need to HUP crond.

HTH-

John
-- 
John Hazen              john@hazen.net              eFax: 801.697.4349
----------------------------------------------------------------------
"Something is about to happen.  Something peculiar is about to happen 
any moment."
                -- "James and the Giant Peach"