Recurring events auto-creation (take 2)

Home Forums Calendar Products Events Calendar PRO Recurring events auto-creation (take 2)

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #1347728
    William
    Participant

    I previously posed this question: https://theeventscalendar.com/support/forums/topic/recurring-events-auto-creation/

    Last week I was finally able to update everything. Still having the problem described — I selected the option to create recurring events 3 months in advance, but it’s not automatically happening, it only happens if I open up the event and click “update” (regardless of whether I make any edits).

    For example, this indefinitely recurring weekly event was last edited August 20-something.

    https://calendar.hudsonvalleyone.com/event/senior-feel-good-aerobics-with-diane-colello/all/

    At that time it created events through late November. But by now it should have created a few more – Nov. 30 and Dec. 7.

    If I go in now and just hit “update” it will do that, but of course we need that to happen automatically.

    Any assistance you could provide would be most appreciated!

    #1348252
    Andras
    Keymaster

    Hi Wiilliam, welcome back!

    Thanks for getting in touch again. I’m sorry this is still happening. Let me try to help you with this.

    As a start I would like to get some more information of your setup:

    • please share your system information
    • Where is your site hosted? Which hosting provider do you use?
    • Does this happen with events created in the past (before the update) or also with new events?
    • Does this also happen if you deactivate all non-calendar plugins and switch to a default theme like twentyseventeen?

    Thanks for all this!

    Looking forward to helping you solve this.

    Cheers,
    Andras

    #1348310
    William
    Participant

    This reply is private.

    #1348319
    William
    Participant

    Note: The previous reply marked “private” contains system info. I realize anyone else trying to work their way through a similar problem will find it hard to follow with private messages interspersed. So we’ll leave that one private and I’ll include the rest of the message below. There’s actually one change from the previous message so please disregard everything before the system info, András.

    Hosting
    Site is hosted with wpengine.

    Past events or New events
    I checked a daily event created after the update – last Friday. It had created three months worth from that day. When I updated just now, it gave it another few days. That means it’s affecting post-update events too, right?

    Theme and plugins
    We’re already using a default theme, 2016, for this very reason… easier troubleshooting ?
    I haven’t tried deactivating all the plugins. Most of them are necessary for the site’s normal functioning. And with the nature of this issue, it seems like they’d have to stay disabled for awhile, right? The script that’s supposed to go through and create the events ahead of time wouldn’t instantly kick in?

    #1348543
    Andras
    Keymaster

    Thanks for sharing that William!

    I checked and there is a cron job that should be running daily, which is responsible for 1) cleaning the old-old recurring events and 2) creating the new recurring events in the future; based on the setting under Events > Settings > General.

    Might be that the cron is not kicking in.

    Try the following:

    • install and activate the WP Crontrol plugin
    • go to Tools > Cron Events and check if this cron exists and is being run daily
    • You can also check if it does it’s job if you click on “Run now” – if you are certain some events should be there in the future but they are not

    By the way, are the old recurrences being deleted?

    Andras

    #1348547
    Andras
    Keymaster

    To let you know, I tested the above, and running the cron manually did it’s job.

    I set the option to create events 2 months in advance.

    I created a recurring event, recurrence weekly, never ending.

    It was properly created for 2 months in advance.

    I changed the setting to 3 months.

    I checked, the future events were not automatically created simply by changing the setting.

    I manually ran the above-mentioned cron and event were created for another month in the future.

    A.

    #1348773
    William
    Participant

    OK, I installed the plugin, and saw that particular chron, and ran it. It said it ran successfully, but no events were created. I tried the same thing you did, changing the time to two months in advance, creating an event, then changing it to three months in advance and running the chron. It didn’t do anything. (test event created just now with two months in advance setting.)

    So no luck there. However, the delete chron works. I see it deleting events regularly via our activity log plugin. (Screenshot attached)

    In the event edit screen, these past events appear as a list of recurrence exceptions. I guess that’s how it works? (Screenshot attached)

    I hope this provides some valuable clue. It seems strange that one part of the recurrence housekeeping would work and not another.

    #1349151
    Andras
    Keymaster

    Indeed this is strange.

    Thanks for sharing all the details.

    As next it would be great to do a test for conflicts based on our guide.

    Easiest would be to do the same exercise as you did above, but with all non-calendar plugins deactivated and possibly with a default theme – which you already have.

    I understand that this can be sometimes difficult on a live site. In this case setting up a staging site that reproduces the issue would be the approach.

    Looking forward to hear the results.

    Cheers,
    Andras

    #1349157
    Andras
    Keymaster

    Meanwhile I did some testing as well.

    The expired events showing up as exclusions are not intended.

    Some time back (around EC PRO version 4.4) we have changed how recurring events are handled in the background.

    My hunch is that these misbehaving events were created before that version. Even though we have published a fix some time ago, the fix couldn’t address some recurrence rules, especially the custom rules.

    So in this case I would recommend to delete the recurring events that have issues and re-create them.

    Andras

    #1349379
    William
    Participant

    OK…

    I switched over to my staging site, disconnected all non-calendar plugins except Cron Events, and switched to 2017 theme. Still no luck.

    Here are a few events I created with the option checked for two months of recurrence. I later switched to four months and ran the cron event, but no further events were created.

    http://upcal.staging.wpengine.com/event/a-game-of-thrones-discussion/all/
    http://upcal.staging.wpengine.com/event/walk-with-a-horse-along-the-shore/all/
    http://upcal.staging.wpengine.com/event/go-fish/all/

    I’ll followup with a post with the site info from the staging site just in case there’s anything amiss there.

    #1349380
    William
    Participant

    This reply is private.

    #1349676
    Andras
    Keymaster

    Thanks for setting up that staging site! That’s great!

    This shows that the issue is not unique to your site. We have seen some similarly odd behavior at some hosting providers. A hunch is that WP Engine might have something to do with this.

    Could you provide me a database dump of your staging site? I would like to fire it up locally and test it whether I get the same odd behavior.

    In case you feel like it, you might also want to get in touch with WP Engine and ask them to check if they see anything on their side when the cron is supposed to be fired.

    Cheers,
    Andras

    #1349765
    William
    Participant

    This reply is private.

    #1349897
    William
    Participant

    So I reached out to the host- the chron is getting killed by the server because it’s taking longer than 60 seconds.

    Useful info I might not have mentioned before: I believe it stopped creating future recurring events in May after working fine since the previous August.

    #1350559
    Andras
    Keymaster

    Hi William,

    Hmmm… the timeout seems to be the issue then. If you have a lot of recurring events, than indeed it can take some time until the cron goes through all of them and generates the new events. It also depends on the speed of the server and the database.

    What would help here is increasing the max_execution_time on the server to a higher value. I would go with 120 and check if it works. If not, then still higher.

    Check if that can be done and if it helps and let me know.

    Andras

Viewing 15 posts - 1 through 15 (of 22 total)
  • The topic ‘Recurring events auto-creation (take 2)’ is closed to new replies.