WP Cron Doesn’t Execute When Time Elapses

The goal I want to use wp_schedule_single_event( ) to execute a single event that sends me an e-mail 8 minutes after the user submits a form. The issue The following code is in my functions.php: function nkapi_send_to_system( $args ) { wp_mail( ‘xxx’, ‘xxx’, $args ); } add_action( ‘nkapi_send’, ‘nkapi_send_to_system’ ); function schedule_event( $id ) { … Read more

How to test wp_cron?

This is kind of a stupid question… I scheduled a action to run every hour: if(!wp_next_scheduled(‘my_hourly_events’)) wp_schedule_event(time(), ‘hourly’, ‘my_hourly_events’); add_action(‘my_hourly_events’, ‘the_function_to_run’); function the_function_to_run(){ echo ‘it works!’; } How can I test if this works without waiting an hour? 🙂 I tried adding wp_clear_scheduled_hook(‘my_hourly_events’); before this code and adding wp_cron() after, but I don’t see my … Read more