Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: How To Understanding Core Events and Cron

Discussion in 'Misc WordPress Requests' started by bcworkz, Apr 4, 2018.

  1. bcworkz


    Reply To: How To Understanding Core Events and Cron, by bcworkz

    Since you understand about site visitation, you are probably aware that wp-cron is completely unrelated to server CRON tables. There’s not really much to wp-cron. When a request is made, part of the initialization of WP includes loading and executing wp-cron.php. Review that file’s source code for more detail. Scheduled events are stored in the options table under “cron”. If the associated timestamp of any event is earlier than the current time, the related action fires. The callback added to that action executes. The event is then removed from the options array, or rescheduled if it’s a recurring event.

    If you are having trouble, check you code against examples in the Codex for recurring or single events. Be sure you are adding an action handle to scheduling functions, not a callback function. Don’t forget to add your callback to the action you specified.

    Be sure that DISABLE_WP_CRON constant is not defined as true any where, usually wp-config.php. Try using the health-check plugin’s troubleshooting mode. You’ll need to temporarily copy your scheduling code to functions.php of twentyseventeen theme. There should be no reason properly coded wp-cron would not work in this mode. Restore your normal theme and plugins one by one using the troubleshooting admin bar item. When wp-cron again fails, the last activated module is causing a conflict.

    Reply To: How To Understanding Core Events and Cron

Share This Page

Monarch Social Sharing Plugin