Hello, I want to install software that posts RSS feeds from other sites onto my blog. I installed it into my plugin area and I also installed the file that allows you to update the RSS feed which creates the posts. The problem is that to automate it, you need to create a cron job and I dont know if Im writing the code into the line correctly. They tell you to write in, 25 * * * * cd $HOME/www/wp/wp-content ; php -q update-feeds.php Im gussing the number and stars refer to the amount of time it should be updated. I dont know if Im writing the rest correct because its not updating. Also, my blog is in the main directory. Thanks, George Christodoulou
Your cron job is setup to run every 25 minutes. The asterisks are Minute Hour Day of Month Month Day of Week I would change the command to 25 * * * * /usr/bin/php -q /home/username/www/wp/wp-content/update-feeds.php If that doesn't work, try 25 * * * * /usr/bin/php -q /home/username/www/wp/wp-content/update-feeds.php > /tmp/update-feeds-output.txt Then after you are 25 minutes past the hour go into the tmp directory and 'cat update-feeds-output.txt' and see what the error is. By putting the pipe at the end it will send all output to a file. This is usually the best way to see why a script isn't executing correctly. This assumes the PHP-CLI executable is indeed in /usr/bin. You can find out for sure by typing 'which php' from a command prompt.
well this line is wrong You don't have the $HOME outside php use this but if the path is not correct contact your support: replace the username with your username
Your cron job would run at the 25-th minute of the every hour. You may configure your home directory in the cron job file also. It would be better to use complete path names for everyting. HOME=/home/user/www/wp/wp-content 25 * * * * /usr/local/bin/php -q /home/user/www/wp/wp-content/update-feeds.php
One other thing to bear in mind is that you will get mail from crond every hour, which can mount up. If you do not want this then you should redirect stdout and stderr to /dev/null