Need your help.
I need to run the CRON jobs on my local host as i am fetching feeds using RSS feeder. Please suggest how this can be achieved.
Thanks for your help.
Take a look to this simple manual. This explains you how Cron works and how to add tasks to your crontab.
EDIT
Asuming you are on GNU/Linux, edit your crontab:
$ crontab -e
And add at the end the following line to execute it every minute:
*/1 * * * * /usr/local/bin/php -q /route/to/your/script.php
Make sure that your php executable is in /usr/local/bin
If you can try to divide your problem into two, it might be easier to solve for you:
-Writing a script which fetches the rss feed and does whatever you want it to do
-Scheduling the run of that script using a cron job.
These two parts are usually independent of each other.
Are you already done with the first part? Do you have a script which can do the fetching?
If it is ready already. What type of script is it? Perl,python, something else?
UPDATE: So you want to call a PHP script on a schedule using cron jobs.
You'll probably get permission errors in your first tries, so chmod your php script to 0755.
Open up your terminal and try the code examples here.
Once you find a working command the first part is complete.
Now with the easy part.
Type crontab -e
Press insert
Let's say within the above examples the "wget http://www.domain.com/file.php" worked for you, then type in:
*/5 * * * * wget http://www.domain.com/file.php
In my terminal, I need to press esc-shift and press z two times to close the crontab. If it works for you too great. You will get one line output saying crontab installed
. Job done. Every five minutes your php script will work.
if you're working on a Windows environment, the easiest way to achieve this would be to set up a scheduled task to execute the PHP script that will fetch your RSS data (using the php executable - see here)