• telltec

    (@misterelvis)


    Hi there! We use Litespeed Cache on many of our sites and it works great, thank you very much for developing it!

    I actually only today noticed that it provides a native “warming cron” and explored it. What I haven’t been able to see: is there a way we can run that crawler cron only on a manual schedule? I’d like to run it once every day but only during the night.

    I’ve seen the Server Load Limit which kinda goes in the right direction of what I’d like to achieve but I’d still prefer to have it run only at night when there are almost certainly no customers accessing the site.

    Is there a way to achieve this?

    Thanks! Aaron

Viewing 1 replies (of 1 total)
  • At the moment, the LiteSpeed Cache plugin does not have a built-in option to schedule the crawler at a specific time of day. However, you can try disabling the crawler in the LiteSpeed Cache plugin settings and using WP-CLI with your server’s system cron to start it at the time you prefer.

    For example, if you want it to run every night at 2:00 AM, you can create a cron job such as:

    0 2 * * * /usr/local/bin/wp litespeed-crawler run --path=/path/to/wordpress > /dev/null 2>&1; sleep 10; /usr/local/bin/wp litespeed-crawler run --path=/path/to/wordpress > /dev/null 2>&1

    The second execution may be useful because sometimes the first run can reset the crawler and the following run actually continues the crawling.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.