Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: nb69 on September 16, 2005, 12:40:09 AM
-
Hello,
I'm running SME 6.01.
I've got a crontab entry that runs a script to extract various RSS feeds and write to an HTML file.
My Contrab Entry looks like this:
/home/e-smith/files/ibays/rss/html/donow >> /dev/null 2>&1
The actual script for "donow" is :
/usr/bin/php -q /home/e-smith/files/ibays/rss/html/crawlrss.php > /home/e-smith/files/ibays/rss/html/index.html
It runs every 4 hours ok. And the html file is created. But there is no content.
When I run the script from the shell, got no problems. Even when I "sudo -u root" its ok from the shell.
Anyone know why cron is having problems?
Thanks!
-
I've got a crontab entry that runs a script to extract various RSS feeds and write to an HTML file.
My Contrab Entry looks like this:
/home/e-smith/files/ibays/rss/html/donow >> /dev/null 2>&1
...
When I run the script from the shell, got no problems. Even when I "sudo -u root" its ok from the shell.
Anyone know why cron is having problems?
Remove the redirection of error output to /dev/null and you will probably find out.
-
Hi ,
thanks for the reply. I removed the redirection. Not getting any messages. And the html is not not being build by cron.
Any thoughts?
-
Any thoughts?
Try:
env - /usr/bin/php -q \
/home/e-smith/files/ibays/rss/html/crawlrss.php
-
Hi,
ok, tried that command. Now it no longer works from the shell :(
-
Now, I've changed permissions to all the php files to have execute on. And now it works from the shell again. I just don't get it. It works perfectly on another server (debian based) without all this hassle.
But as soon as cron executes it, it creates an incomplete html file.
-
If anyone wants to give the script a try you can grab it from here:
http://lastrss.webdot.cz/
Its a pretty cool RSS php class.
Thanks.