+
+ if ( function_exists('wp_next_scheduled') && function_exists('wp_schedule_event') ) {
+ // WP 2.1+: delete old comments daily
+ if ( !wp_next_scheduled('akismet_scheduled_delete') )
+ wp_schedule_event(time(), 'daily', 'akismet_scheduled_delete');
+ } elseif ( (mt_rand(1, 10) == 3) ) {
+ // WP 2.0: run this one time in ten
+ akismet_delete_old();
+ }