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.
This question came from our site for professional and enthusiast programmers.
Take a look to this simple manual. This explains you how Cron works and how to add tasks to your crontab.
Asuming you are on GNU/Linux, edit your crontab:
And add at the end the following line to execute it every minute:
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:
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.
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
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)