function ds_npr_api_get_multi_settings_callback() { $run_multi = get_option('dp_npr_query_run_multi'); if ($run_multi) { DS_NPR_API::ds_npr_story_cron_pull(); } //change the cron timer if (wp_next_scheduled('npr_ds_hourly_cron')) { wp_clear_scheduled_hook('npr_ds_hourly_cron'); } error_log('updating the cron event'); wp_schedule_event(time(), 'ds_interval', 'npr_ds_hourly_cron'); }