Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    I am having the same problem, your solution did not work for me. I have however found an alternative:

    Here is a function to remove the clean cache event:

    function wpse39681_clear_all_crons( $hook ) {
        $crons = _get_cron_array();
        if ( empty( $crons ) ) {
            return;
        }
        foreach( $crons as $timestamp => $cron ) {
            if ( ! empty( $cron[$hook] ) )  {
                unset( $crons[$timestamp][$hook] );
            }
        }
        _set_cron_array( $crons );
    }

    The hook parameter in this case is “clean_cache_event”. This plugin has been giving me some problems, as it was scheduling at least twenty cron jobs per minute and failing. Hence I would get 1GB-sized log files every half an hour. You can imagine my frustration.
    `

    Here is a function to remove the clean cache event:

    function wpse39681_clear_all_crons( $hook ) {
        $crons = _get_cron_array();
        if ( empty( $crons ) ) {
            return;
        }
        foreach( $crons as $timestamp => $cron ) {
            if ( ! empty( $cron[$hook] ) )  {
                unset( $crons[$timestamp][$hook] );
            }
        }
        _set_cron_array( $crons );
    }
Viewing 2 replies - 1 through 2 (of 2 total)