This isn't as simple of a question as you may think. Basically I have a C# program that is hitting the worpdress site and the wp_schedule doesn't seem to fire off. If I go to the site with my firefox browser then it seems to fire-off. Soooo what's the difference here? What exactly causes the cron to fire? Is it the HTTP GET? Or is there some script or function inside the page that is loaded by browsers?
|
|
The WP-Cron functions are not actually cron functions. Instead of a cron running and executing tasks precisely as scheduled, it waits until the frontend or admin is loaded, checks if any jobs are scheduled and then fires as needed. To execute the cron jobs, WP loads As an alternative, I would recommend using a GET request to
Along with this, you need to disable the default way of handling cron:
Another discussion of this can be found here: http://caramboo.com/2010/03/wordpress-remote-cron-scheduling/ |
|||||||||
|
|
Are you following redirects? In cron.php you can see that the spawn_cron function is doing
I didn't work a lot with WP crons, but maybe this point you on the right path |
|||||
|
|
If you want to remove the need for C# polling then this shameless plug (in :) might solve your problem: Paul |
|||
|
|