• Resolved threefeathers

    (@threefeathers)


    We have a file uploaded every 15 minutes at :00, :15, :30 and :45. I would like to run the Cron 5 minutes after every upload: at :05, :20, :35 and :50.

    Is it possible to schedule this process as such?

    Thank you,
    Lloyd.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    You can do this by scheduling an event with:

    • A recurrence of every 15 minutes
    • A next run time of whenever the next :05, :20, :35, or :50 time is

    However! It’s likely that these events won’t continue to fire at the expected times as the cron event runner in WordPress doesn’t guarantee when an event will run, and you’ll see some drift in the start time. For example if your site gets little traffic then the events can begin to run late and subsequent events will get scheduled 15 minutes after the late running one, and so on as late running events compound.

    I’ve written about this here: https://github.com/johnbillion/wp-crontrol/wiki/Cron-events-that-have-missed-their-schedule

    Cavalcade (linked on that page) is your best bet to avoid this but requires you set up some additional infrastructure.

    Thread Starter threefeathers

    (@threefeathers)

    Hi John, Thank you for the quick response, the info and the article.

    It’ good to see good support.

    Thank you,

    lloyd.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom recurrence’ is closed to new replies.