How could I debug cron task run by internal cron functions? My cron task is not firing and I suppose some functions are not declared yet when cron hook takes place.
It would be great if I can store the errors into some log file? Any ideas? Thanks.
I used Core Control plugin to see if everything is all right. The my_task_hook and hooked function too, the “due time” is changing…so something else must be wrong.
I found the
wp-cron dashboard plugin
http://wordpress.org/extend/plugins/wp-cron-dashboard/
very helpful. Using it I was able to see what cron tasks were working or not.
I also found that the docs on the cron functions weren’t very clear.
When setting up a wp cron task make sure you add the function as an action using add_action only then can you run wp_schedule_event on the task.
Good luck!