• Resolved emilysparkle

    (@emilysparkle)


    i just learned about your plugin yesterday. this is my first cron attempt. i made two bits in my functions file that call hooks to reset product quantities and clear completed orders on a weekly basis from my woocommerce set up. it works! when i hit run now, it does all the things. yay.

    when i created and tested the hook, it was 10:30 in the morning so the hook is set to update 7 days from then….but i’d rather the functions ran in the evening when it makes more sense based on real life.

    so last night, i fired the ‘run now’ again from your plugin, hoping the time would reset to check in the evening — but looking at the timestamps in my Cron Events page, it looks like the update will still be 7 days after the original run.

    how do i set it anew?

    • This topic was modified 3 years, 8 months ago by emilysparkle.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    You can click Edit next to the event, and from there you can set the time for the next run, eg 2020-08-27 23:00:00. From that point onwards, it will run every 7 days.

    Thread Starter emilysparkle

    (@emilysparkle)

    fanstastic! i’m sorry i didn’t even see that! thanks!

    Thread Starter emilysparkle

    (@emilysparkle)

    oh bummer. i _thought_ i had tried it. sadly, it didn’t actually work. i recorded a little video to show you what happens….

    https://www.loom.com/share/0cb1866be83644b2b833003d002c3e39

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Thanks for the recording. That means there’s a bit of a mystery error occurring when WordPress attempts to update that cron event. Unfortunately WordPress core doesn’t expose all the errors for its cron event system, so a plugin such as WP Crontrol can’t always tell you if or what went wrong.

    I would recommend deleting the event completely, and then adding it in again using the same hook name and your preferred date.

    Thread Starter emilysparkle

    (@emilysparkle)

    weirdly i got one to reset but not the other? i have tried the one a couple times now but it hasn’t shown up in the list.

    mystery errors are a mystery.

    Thread Starter emilysparkle

    (@emilysparkle)

    eventually i got it all to look right in the events list. took a few tries for each though.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘weekly cron questions’ is closed to new replies.