I am attempting to set up a CRON job on XAMPP in Windows but I am having some trouble. I have the timing set up so that it should run every 5 minutes, and this part works because I see my command prompt pop up every five minutes.
This is the code for the CRON.BAT file that runs. Both locations are correct for their respective files.
C:\xampp\php\php.exe C:\xampp\htdocs\codeigniter214\update_simplepie_cache.php
This is my update_simplepie_cache.php file. I'm pretty sure this is the part that's failing, because the MySQL database isn't updating even though the feeds have new items in them. I tried to follow the SimplePie instructions, but it hasn't worked so far.
<?php
$this->load->library('rss');
$feed = $this->rss;
$cache_location = 'mysql://root@127.0.0.1:3306/news_test'; // change to your cache location
$feed->set_feed_url('http://www.theverge.com/rss/frontpage', 'http://gigaom.com/tag/rss-feeds/feed/');
$feed->set_cache_location($cache_location);
$feed->set_cache_duration(9999999); // force cache to update immediatlely
$feed->set_timeout(5); // optional, if you have a lot of feeds a low timeout may be necessary
$feed->init();
?>
Can anyone see what I'm missing here? Thank you.