Home › Forums › Calendar Products › Events Calendar PRO › tribe_events_pro_process_recurring_events always running 'now'
- This topic has 6 replies, 3 voices, and was last updated 8 years, 3 months ago by Support Droid.
-
AuthorPosts
-
October 30, 2015 at 7:31 am #1020238Timothy LindsayParticipant
We’ve noticed our site is constantly running a cron job (evident by the URL always containing ?doing_wp_cron).
We’ve installed the WP Crontrol plugin to take a look at what’s happening. In the list of jobs, tribe_events_pro_process_recurring_events always appears at the top, with the Next Run column showing ‘now’. No matter how many times we refresh the page, it’s always running ‘now’. The Recurrence column shows ’30 minutes’.
Any idea what’s going on here?
October 30, 2015 at 12:07 pm #1020373NicoMemberHi @nucreative,
Thanks for reaching out on this! I’ll try to explain how this works: the recurrence cron tribe_events_pro_process_recurring_events should execute every 30 minutes (not each page load). When fired, the cron will create/delete/update a number of events equal to (or less than) the batch size – which defaults to 100. On page load, we check if the tribe_events_pro_process_recurring_events cron is scheduled and if it isn’t, we schedule it.
Regarding it showing as running all the time, can you tell me how many recurring events you have and what the complexity of their recurrence rules are? Also are you filtering tribe_events_pro_recurrence_processor_interval or tribe_events_pro_recurrence_small_batch_size?
Have a great weekend,
NicoNovember 1, 2015 at 10:20 am #1020601Timothy LindsayParticipantHi Nico,
Thanks for the explanation of how tribe_events_pro_process_recurring_events should work. That makes sense.
We currently have 1,542 events in the database. I’m not sure exactly how many of those are originals and how many are recurrences though.
We did have “Create recurring events in advance for” set to 24 months, however we changed this today to 12 months.
If I look at a typical event, it’s recurring weekly, and the edit page is telling me “105 instances of this event have been created through Sep 30, 2017”.
So I’m guessing rougly 1% of those 1,542 are originals, and the rest are recurrences.
We’re wondering if deleting all events from 2016 onwards might help?
The odd thing is, it seems the cron job *should* have finished it’s work by now, having created all recurrences in the original 24 month (now 12 month) period.
Oh, we’re not using either of those filters you mentioned.
November 2, 2015 at 5:33 am #1020687NicoMemberHey @nucreative,
Thanks for following up! Well that seems to be a good amount of events indeed. I think it’ll be better to have “Create recurring events in advance for” set to 12 months instead of 24, not to have some many instances of those events (unless that’s necessary in the site). When you change this, the cron itself should clean up the “extra instances” so there should be no need to delete them manually.
As you say I guess the cron should have finished it’s heavy work by now, as it process batches of 100 events per run. It will continue to run every 30 minutes anyway but not run all that time.
Is this the plugin you are using to view the cron jobs: WP Crontrol? I’m aware you mentioned this earlier but there a couple with very similar names. I would like to make a quick check on this locally.
Thanks,
NicoNovember 2, 2015 at 9:25 am #1020854Timothy LindsayParticipantHi Nico, yes, we tend to use WP Crontrol, not to be confused with the similarly named “WP Cron Control”.
It seems the cron job is still running constantly, even after deleting a lot of events, and reducing our recurring event creation period.
Oh, another thing to mention is that we are using WP_ALTERNATE_CRON due to server limitations. We will be moving to a new server later today that may support the standard wp cron. If so, we will see if it makes any difference.
November 3, 2015 at 8:07 am #1021295NicoMemberHi @nucreative,
Just a quick heads up, I’ve tested this locally and I don’t see the cron as running all the time 🙁
Have you tried to de-activate and re-activate PRO ? I’m not sure if WP_ALTERNATE_CRON should alter the way the recurrence cron works, but I’ll ping the dev team on that.
Please let me know if you finally migrate and can run regular crons on the new server,
Best,
NicoFebruary 18, 2016 at 8:30 am #1075348Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘tribe_events_pro_process_recurring_events always running 'now'’ is closed to new replies.