Cron Register everytime if i reload admin if i pass some extra argument in wp_schedule_event function
This happens because this code: if ( ! wp_next_scheduled( ‘myprefix_cron_hook’ ) ) { wp_schedule_event( time(), ‘every_one_hoursinwp’, ‘myprefix_cron_hook’,array(42)); } Is the same as this code: if ( ! wp_next_scheduled( ‘myprefix_cron_hook’, array() ) ) { wp_schedule_event( time(), ‘every_one_hoursinwp’, ‘myprefix_cron_hook’,array(42)); } And while you have lots of cron jobs with array(42), there is no next scheduled cron job … Read more