• Resolved acurran

    (@acurran)


    Hello,
    I have a cron job that runs weekly. Next execution is scheduled for tomorrow but I clicked on the Execute Now action to run it now. I did not know whether this would reset the next execution date to a week later or keep the already scheduled execution and run again tomorrow as well. It looks like the latter is the case as it still shows next execution time for tomorrow. But I actually do not want it to run until at least another week. So for now I’ve hit Pause. This has brought up a few questions about Execute Now, Pause, Remove:
    1. Am I correct in my finding that Execute Now is like an extra execution of the cron job? i.e. the original scheduled time of execution is still maintained
    2. Is the job executed immediately when it is unpaused?
    3. If I remove a cron job (that is created by a plugin), will it come back by itself, or does it require the plugin to be deactivated/reactivated?
    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kuba Mikita

    (@kubitomakita)

    Hi @acurran, very valid questions!

    1. Am I correct in my finding that Execute Now is like an extra execution of the cron job? i.e. the originally scheduled time of execution is still maintained

    Correct. It doesn’t alter the next execution date.

    2. Is the job executed immediately when it is unpaused?

    When unpaused, we schedule the event with the previous next execution timestamp. If it’s in the past at the time of unpausing, it will be executed immediately.

    3. If I remove a cron job (that is created by a plugin), will it come back by itself, or does it require the plugin to be deactivated/reactivated?

    If it was created by the ACM plugin, it wouldn’t come back. Other plugins might actually check on every refresh if the event is scheduled and they might schedule it over and over again when you remove it.

    Let me know if you have any more questions!

    Thread Starter acurran

    (@acurran)

    Hi Kuba,
    Thanks very much for your response to my questions, it helps with my understanding of how it works. I just have one follow up question:

    If it’s in the past at the time of unpausing, it will be executed immediately.

    If multiple events have passed (e.g. an hourly job paused for 2 days), does the job execute just once when unpaused? or is it executed for each time that was missed? I would assume the former but just checking to make sure.

    Plugin Author Kuba Mikita

    (@kubitomakita)

    If multiple events have passed (e.g. an hourly job paused for 2 days), does the job execute just once when unpaused?

    That’s correct! Only once, and then its subsequent execution is scheduled according to the original definition (ie. in an hour)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Question about Execute Now, Pause, Remove’ is closed to new replies.