Hi,
I would like to create a PHP script that is capable of speaking to the Expression Engine channel API and make that script runnable via a cron job.
To elaborate slightly on what I want to achieve…
A cron job runs every 5 minutes
Grabs a remote XML feed
I insert these record into my channel (e.g. Articles) using the Expression Engine API
I want this script to live outside of the document root and only runnable via the command line.
I’m struggling to figure out where/how to place my PHP script so it has access to everything in my Expression Engine installation/config and so that I can call something like…
ee()->load->library('api');
// I am assuming ee is just the result of get_instance()With Codeigniter 2.1 the cron job support is great (I think certain updates to the way routing is handled were made), but with the codeigniter that Expression Engine is built on (2.0.1 I think), I can’t call the index.php file over the command line and specify.
Can anybody share how they have setup a cron job to work within an Expression Engine install?