• Resolved obertscloud

    (@obertscloud)


    Hi it was recommended by speed experts to disable wp cron and use the system cron from my hostgator account. it did speed up all my websites, but now the scheduled backups are not working.

    so basically
    Minute Hour Day Month Weekday
    4 */6 * * *
    wget -q -O – https://websitelink.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    can you help me get this working please ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor bcrodua

    (@bcrodua)

    Hi,

    Please could you send us a copy of the latest full backup log?
    This can be found in the UpdraftPlus Existing Backups tab.
    The contents will be too long to post here directly, but you can use an online service such as Dropbox or Pastebin, and post the link here.

    Thanks,
    Bryle

    Thread Starter obertscloud

    (@obertscloud)

    The last backup was when i had wp-cron enabled on wordpress and not on the server, how would this help you ?

    https://pastebin.com/hnd07prm

    Plugin Author David Anderson

    (@davidanderson)

    @obertscloud

    > “it was recommended by speed experts to disable wp cron”

    This is bad advice, and should be ignored. I speak as a contributor to the cron code in WordPress core, and a regular core contributor (e.g. check the WordPress 5.8.1 release notes). There is no speed improvement in changing cron method. There is just, usually, less reliability of getting cron tasks run on time.

    David

    Hi @davidanderson could you elaborate on that explanation? I also have the same issue with updraftplus and there are lots of articles, even from hostings that recommend disabling wordpress cron and setting a cron job for speed/performance gains.

    Plugin Author David Anderson

    (@davidanderson)

    No problem!

    The advice is just “folk wisdom” that people who don’t really know about the internals of WP’s cron system have copied round in circles between themselves, and has been repeated so many times that people assume it must have something behind it. But actually there’s not much to explain because ultimately there isn’t something behind it; it’s just plain false.

    If in your site’s scheduled task list (which you can view by installing a plugin like WP Crontrol and going to Tools -> Cron Events), there is a scheduled task that is due, then WP will seek a way to execute it. That task will require precisely the same amount of resources to execute independently of how you are causing WP Cron to be invoked. It’s like telling someone on WhatsApp to do a task, or telling them by email instead: however they get the message, the task itself takes the same amount of resources.

    The implication of the advice is that WP’s default way of looking up the list of cron tasks is inefficient. That’s not true. It’s a list in the database which gets auto-loaded, always, on every WP script load of every type, regardless of how it’s used, and the resources used are infinitesimally small in the context of all that WP does in loading each time a script is run.

    The only thing that you can do by running WP cron via a different route is run it too few times relative to the length of the internal jobs list (i.e. to the number of tasks that are due). That “saves resources” in the sense that tasks that were meant to be done at some defined time only get run later (which will cause an item to appear in ‘Site Health’ if you look there). But that isn’t something you want to happen. If a site has tasks that aren’t actually needed, then sticking a spanner in WP cron isn’t the way to deal with it, because that affects all tasks, not just the ones you didn’t want.

    It’s for this reason that people who assert that you can improve performance by running WP Cron a different way never accompany this assertion with any measurements – that would be impossible, because there’s really nothing ultimately behind the assertion.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘automatic updates not working after switching cron’ is closed to new replies.