I have a news system on my site using WordPress and would like to run Feeder manually to collect news when it's posted. I have a WordPress plugin that automatically runs a script whenever a post is made, and it would be easy to hook in a command to run all RSS feeds right away if I knew how the !@$^*! that could be done. I suspect this is easy but I've searched the forums a few times and looked at the cron jobs page and can't figure it out. This would be much more efficient than having a dozen cron jobs running every 10-30 minutes "just in case" and would also get the news out faster (as in, instantly).
I tried looking into deferred.php but can't figure out where the “feeder” script is.
Content being imported in via RSS. I tried to find a way to do it via WordPress plugin but did not. At first I just did the main feed but now I have news coming in by category (each category has its own RSS feed) to individual forums. TMI? and thanks for the quick reply. Gosh, I'm not in InvisionLand any more!
Oh, I see. I can run /directory/library/XenForo/CronEntry/Feeder.php from shell…, right?
Edit: it looks as though I can run that from shell but not from a browser. I am using the Webhooks plugin for WordPress and will see if that works even if I can't do it from a browser (it can essentially hit a URL). If that fails I will see if I can trigger the running of the Feeder.php file from the existing php file I run when a news item is posted.
No. The code in question can only be run within the XF framework (once it's started up). You would need to custom develop a script to call the necessary part of the API. (You could base the start up code on deferred.php and then call the necessary method to start the feed import.)
In a similar vein, is it possible to code a cron job to import the contents of an .xls file from an external website into the database?
I've got something working locally which takes a copy of an .xls file stored on someone else's website (using .php fopen/fwrite) , and then read/display the contents (using PHPExcel - Home) but ideally I would have thought it would be better to use XenForo built in code? My code does not seem to work when added into XenForo for some reason.