I don't know why my scheduled cron events not working anymore, it used to before with the same code.
I wrote a plugin that updates a CRM with the order note, if the communication fails I setup a scheduled event for the same function to run with the same arguments for 1 minute in the future with this piece of code:
wp_schedule_single_event( time() + MINUTE_IN_SECONDS, 'woo_kala_order_note_added', array( $comment_id, $kala_order_id ) );
I tried to place woo_kala_order_note_added
function both in the plugin and in the theme and error log the arguments but my debug.log is still empty.
Here's a screenshot of the Cron Manager plugin showing the schedule that is registered but the function won't actually fire.
Any idea why this might happen?
Thanks
define( 'DISABLE_WP_CRON', true );
? If you visit / curl /wp-cron.php does that trigger the job?DISABLE_WP_CRON
is not set. When I look at the cron events, I see that the action is registered and when the time passes it disappears so the cron systems looks to be working well, it's just that the function is never fired because I placed error_log at the beginning of it. Vising/wp-cron.php
doesn't really help.error_log
are you absolutely sure you're checking the correct location for your erorr_log files? Depending on your configuration, the particularly logs you're looking for may be output to a location you're not aware of - this is somewhat common. The location can also change depending on the what is called and when.