List Info

Thread: Issue with Planet Cron Job




Issue with Planet Cron Job
user name
2007-02-14 23:48:58
I have my crontab setup to build my planet feed every so often. The command in crontab is "python /home/user/planet/planet.py /home/user/planet/technews/config.ini". The problem is I get the error message "Configuration missing [Planet] section." from crontab but when I run it from the command line, it works perfectly. Any ideas? I am running version 2.0 (or the latest non-development release). python -V is Python 2.3.5.

--
Mike Wills
http://www.linkedin.com/in/mikewills
Blog - http://mikewills.name
Podcasts - http://podcastmike.com
Re: Issue with Planet Cron Job
country flaguser name
Portugal
2007-02-15 12:19:46
Hi,

Mike wrote:
 > I have my crontab setup to build my planet feed every
so often. The 
command in crontab is "python
/home/user/planet/planet.py 
/home/user/planet/technews/config.ini". The problem is
I get the error 
message "Configuration missing [Planet] section."
from crontab but when 
I run it from the command line, it works perfectly. Any
ideas? I am 
running version 2.0 (or the latest non-development release).
python -V 
is Python 2.3.5.
I had that problem too with planetplanet.
The i solved it was to put a script containing line in the
directory the 
command works manually and in the ccrontab, invoke that
script.

Regards,
Rachael
-- 
devel mailing list
devellists.planetplanet.org

http://lists.planetplanet.org/mailman/listinfo/devel

Re: Issue with Planet Cron Job
country flaguser name
United States
2007-02-15 15:01:58
On Feb 15, 2007, at 12:19 PM, Rachael wrote:

> Hi,
>
> Mike wrote:
> > I have my crontab setup to build my planet feed
every so often.  
> The command in crontab is "python
/home/user/planet/planet.py /home/ 
> user/planet/technews/config.ini". The problem is I
get the error  
> message "Configuration missing [Planet]
section." from crontab but  
> when I run it from the command line, it works
perfectly. Any ideas?  
> I am running version 2.0 (or the latest non-development
release).  
> python -V is Python 2.3.5.
> I had that problem too with planetplanet.
> The i solved it was to put a script containing line in
the  
> directory the command works manually and in the
ccrontab, invoke  
> that script.
>
> Regards,
> Rachael


My best guess is that you have something important in  
your .profile, .bashrc or .cshrc.  crontab runs with a
rather minimal  
shell, so it's likely not picking up a PATH or other EnvVar
needed to  
run Planet correctly.  Perhaps you have two versions of
python  
installed on your computer?

On my Mac, my python is installed in /sw/bin/python, so my
solution  
to the crontab path problem is this line which sources my
.profile  
before trying to run the program.

0 16 * * * . /Users/chris/.profile ;
/Users/chris/venus/planet.py

Chris

--
Chris Dolan, Equilibrious LLC, http://equilibrious.net/

Public key: http://chrisdolan.ne
t/public.key
vCard: http://chrisdola
n.net/ChrisDolan.vcf



-- 
devel mailing list
devellists.planetplanet.org

http://lists.planetplanet.org/mailman/listinfo/devel

Re: Issue with Planet Cron Job
user name
2007-02-16 10:02:42
Found out the problem was the end-of-line character in the crontab. It is fixed and working now. Thanks for the suggestions.

On 2/15/07, Chris Dolan < chrischrisdolan.net">chrischrisdolan.net> wrote:
On Feb 15, 2007, at 12:19 PM, Rachael wrote:

> Hi,
>
&gt; Mike wrote:
>; > I have my crontab setup to build my planet feed every so often.
>; The command in crontab is "python /home/user/planet/planet.py /home/
>; user/planet/technews/config.ini&quot;. The problem is I get the error
&gt; message "Configuration missing [Planet] section.&quot; from crontab but
> when I run it from the command line, it works perfectly. Any ideas?
>; I am running version 2.0 (or the latest non-development release).
> python -V is Python 2.3.5.
>; I had that problem too with planetplanet.
> The i solved it was to put a script containing line in the
> directory the command works manually and in the ccrontab, invoke
&gt; that script.
&gt;
> Regards,
&gt; Rachael


My best guess is that you have something important in
your .profile, .bashrc or .cshrc.&nbsp; crontab runs with a rather minimal
shell, so it's likely not picking up a PATH or other EnvVar needed to
run Planet correctly.  ;Perhaps you have two versions of python
installed on your computer?

On my Mac, my python is installed in /sw/bin/python, so my solution
to the crontab path problem is this line which sources my .profile
before trying to run the program.

0 16 * * * . /Users/chris/.profile ; /Users/chris/venus/planet.py

Chris

--
Chris Dolan, Equilibrious LLC, http://equilibrious.net/
Public key: http://chrisdolan.net/public.key
vCard: http://chrisdolan.net/ChrisDolan.vcf






--
Mike Wills
http://www.linkedin.com/in/mikewills
Blog - http://mikewills.name
Podcasts - http://podcastmike.com
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )