Cronjob not running anymore

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
Benni
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 16 Feb 2008, 12:07

Cronjob not running anymore

Postby Benni » 01 Apr 2008, 23:39

Hi there,

I´m updating my feeds through a cronjob. This looks like this (without time):

Code: Select all

php5 /path/to/tt-rss/update_feeds.php >>/path/to/logs/feedreader.log 2>>/path/to/logs/feedreader.log


It´s a transformed version of this one that works with my hoster:

Code: Select all

*/30 * * * * /usr/bin/php /home/user/public_html/tt-rss/update_feeds.php >/dev/null 2>&1


But since 1 or 2 months I get this message in the logfile:
<b>Fatal Error</b>: You forgot to copy
<b>config.php-dist</b> to <b>config.php</b> and edit it.


I copied the file to config.php and it just works fine, but not with my cronjob. I´m really wondering about this, because I didn´t change anything related to this file.

Do you know why this happens?

Benni

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Cronjob not running anymore

Postby fox » 02 Apr 2008, 01:07

It probably can't find the config due to wrong current directory.

Try something like cd /to/ttrss/dir && php ./update_feeds.php

Benni
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 16 Feb 2008, 12:07

Postby Benni » 02 Apr 2008, 07:31

Well. The directory is right. It also works when I´m accessing the update_feeds.php from the browser. Only the cronjob isn´t running.

Benni

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Postby fox » 02 Apr 2008, 18:11

The directory is right.

Are you sure? Add this at the beginning of the script:

Code: Select all

<?php print getcwd() . "\n" ?>


If it shows your tt-rss directory and your cron user has read access to tt-rss files, then well I'm stumped. :(

Benni
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 16 Feb 2008, 12:07

Postby Benni » 02 Apr 2008, 19:37

The directory is the right one. And normally the cronuser has read access. But to get sure about this I´ll ask the support of my hosting company.

Benni

scottywz
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 03 Apr 2008, 01:24
Location: Texas, USA
Contact:

Postby scottywz » 03 Apr 2008, 01:25

Have you tried writing a shell script like this?:

Code: Select all

#!/bin/sh

cd PATH_TO_TT-RSS
php -f update_feeds.php


and calling that from the cronjob? That works for me.

Benni
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 16 Feb 2008, 12:07

Postby Benni » 03 Apr 2008, 21:27

I would give it a try if I could, but I can´t use shell scripts. It´s not a root or managed server. It´s just a simple webhosting package.

I even tried to access the script with lynx in a cronjob. But it seems I have no rights to use lynx.

Benni

EDIT: I tried the shell script and it does work. I wonder why, but it does! Thanks to you I can update my feeds again with a cronjob.

scottywz
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 03 Apr 2008, 01:24
Location: Texas, USA
Contact:

Postby scottywz » 04 Apr 2008, 03:26

Glad I could help.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 25 guests