Display Only Ready Scheduled Events (Corn Jobs)

Advertisement

Description Description

By using the function wp_get_ready_cron_jobs() to get all the READY scheduled events OR READY corn jobs.

Note: Use below code snippet for ONLY debugging/development purpose.

Top ↑

Code Snippet Code Snippet

<?php
/**
* Show all READY scheduled events OR corn jobs.
*
* NOTE: Use this snippet for only debugging purpose.
*
* @todo Change the `prefix_` and with your own unique prefix.
*
* @since 1.0.0
*/
if( ! function_exists( 'prefix_show_all_ready_scheduled_events' ) ) :
function prefix_show_all_ready_scheduled_events() {
echo "<pre>";
print_r( wp_get_ready_cron_jobs() );
echo "</pre>";
wp_die( );
}
add_action( 'admin_head', 'prefix_show_all_ready_scheduled_events' );
endif;

Top ↑

Output Output

Array
(
    [1551289036] => Array
        (
            [wp_import_astra_sites_cron] => Array
                (
                    [40cd750bba9870f18aada2478b24840a] => Array
                        (
                            [schedule] => wp_import_astra_sites_cron_interval
                            [args] => Array
                                (
                                )
                            [interval] => 300
                        )
                )
        )
)

Leave a Reply