• Resolved techhelpnc

    (@techhelpnc)


    Hi there,

    I have this cron event: fastvelocity_purge_old_cron_event

    It runs 3 times a day on my cron schedule when I checked through WP Control plugin. Does it need to run 3 times a day? I use directory website which has listings which expires daily and renew listings. So cron runs for those listing as well. I am just thinking if this does not conflict with the other crons.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Raul P.

    (@alignak)

    Hi,

    https://prntscr.com/myz9yx

    FVM adds a daily event, not supposed to be 3, unless you have been upgrading/downgrading and testing, OR if your cron job has missed its schedule. Pay attention to the dates.

    The cron job is very simple and fast.
    It simply deletes cache files which are older than 3 months.
    But you can change it to weekly if you want, though daily is advisable.

    Is that this codes which in this file /wp-content/plugins/fast-velocity-minify/inc/functions.php caused the problem? I also had these problems as the cronjob will keep creating by themself…. otherwise like me it will have many almost above 1500 ‘fastvelocity_purge_old_cron_event’ cronjob in background so i debugs it today. I had changed the original codes below

    Change
    if (!wp_next_scheduled (‘fastvelocity_purge_old_cron’)) {
    wp_schedule_event(time(), ‘daily’, ‘fastvelocity_purge_old_cron_event’);
    }

    to

    if ( !wp_get_schedule( ‘fastvelocity_purge_old_cron_event’ ) )
    wp_schedule_event( time(), ‘daily’, ‘fastvelocity_purge_old_cron_event’ );

    I still testing and hope it will works!

    Plugin Author Raul P.

    (@alignak)

    @infinitymusics my code was incorrect, hence duplicate cron jobs were created.

    I have fixed this on v2.6.1 and it will also delete any duplicate cronjobs set earlier by the plugin.

    Thanks for reporting

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cron Job’ is closed to new replies.