0

I am trying to create custom interval for cron schedule with below code but it is not working,

function cronschedules($schedules) {
$schedules['custom'] = array(
'interval' => 36000, // seconds
   'display'  => __('Custom Interval')
         );
  return $schedules;
 }
add_filter('cron_schedules', 'cronschedules');
wp_schedule_event(time(),'custom','ACPdailyevent');

here is the debug log:

[15-Apr-2014 12:02:12 UTC] PHP Notice:  Undefined index: custom in C:\wamp\www\wp\wp-includes\cron.php on line 111

[15-Apr-2014 12:02:12 UTC] PHP Stack trace:

[15-Apr-2014 12:02:12 UTC] PHP   1. {main}() C:\wamp\www\wp\wp-cron.php:0

[15-Apr-2014 12:02:12 UTC] PHP   2. call_user_func_array() C:\wamp\www\wp\wp-cron.php:87

[15-Apr-2014 12:02:12 UTC] PHP   3. wp_reschedule_event() C:\wamp\www\wp\wp-cron.php:87
2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.