WP Cron jobs loops infinitely

I usually define a IF state and use wp_clear_scheduled_hook function. See example: if (get_option(‘atenasupervisor_scheduler’) <> ‘Stop’) { echo ‘Active (‘. get_option(‘atenasupervisor_scheduler’).’)</strong></div>’; } else { wp_clear_scheduled_hook( ‘atenasupervisor_my_email’ ); echo ‘Not active (‘. get_option(‘atenasupervisor_scheduler’).’)</strong></div>’; } “

Server-Based CRON Job

I think you can resolve this with this way: Step 1: You create a PHP Page with URL you want in your theme like this (page-url-custom-cron.php) to call a Hook WooCommerce Step 2: You use server-based job Curl to the URL: http://yourdomain/url-custom-cron. And now the PHP code page will call WooCommerce hooks for you. Hope … Read more