Weird Cron Problem with PlanetPlanet

Weird Cron Problem with PlanetPlanet

Posted by: Koldark
Posted on: 2007-02-13 08:49:00

I am using PlanetPlanet for some RSS aggregation. I have a cron job that automatically updates every so often. This was working for almost a year now. But suddenly last week it stopped working.

I can go on the command line an execute the command from my home directory: cd /home/homedir/planet/; python planet.py technews/config.ini and it works perfectly. However, adding that to crontab: */30 * * * * cd /home/homedir/planet/; python planet.py technews/config.ini will return this error: Configuration missing [Planet] section.

Any idea what might cause these differences?

Re: Weird Cron Problem with PlanetPlanet

Posted by: vicm3
Posted on: 2007-02-13 16:05:00

No idea, however.. I resolved that via a bash script...
vicm3@f:~$ more creaplanet.sh
#!/bin/bash
cd
cd planet
python planet.py linux/config.ini

For some unknow reason (at least for me) planet don't get the right path, but the script yes.
Try... to put your planet on a script and test (you can see, first I change to my own home, then to planet directory and then execute planet with his config path), as it work for me I don't try further but maybe an absolute config path would work.

Regards.

Re: Weird Cron Problem with PlanetPlanet

Posted by: Koldark
Posted on: 2007-02-13 20:13:00

That worked! Thanks!

Tags: cron jobcd homepypythoncrontabdirectory cdhome directory