Please Advise: CRON Expired Checks Set Hourly. Continues To Check Daily.
Please Advise: CRON Expired Checks Set Hourly. Continues To Check Daily. Image of wp_options table. CP 3.19 Theme effectively writes correct option to DB.
http://screencast.com/t/pVrS2g10om
However,
Code:
if(!get_option('cp_ad_expired_check_recurrance')) $recurranceValue = 'daily';
else $recurranceValue = get_option('cp_ad_expired_check_recurrance');
wp_schedule_event(strtotime('today + 1 hour'), $recurranceValue, 'cp_ad_expired_check');
add_option('cp_ad_expired_check', 'yes');
this code in theme-cron.php says if the option is not set to daily, to schedule the event to one hour past GMT 00:00, being 01:00. This effectively, eliminates any other options to check for expired ads, other than
'today + 1hour'. Result is in this image of Cron Tab under System Info in backend of
WP.
http://screencast.com/t/SavtjZ3QhhK
Please verify my findings and give me the correct code to permit me to set my expired checks to hourly, and twice daily, thank you. I suppose this would work, would it not? (When Hourly option is selected and in DB as see in above first image)
Code:
if(!get_option('cp_ad_expired_check_recurrance')) $recurranceValue = 'hourly';
else $recurranceValue = get_option('cp_ad_expired_check_recurrance');
wp_schedule_event(strtotime('today + 1 hour'), $recurranceValue, 'cp_ad_expired_check');
add_option('cp_ad_expired_check', 'yes');