wp_shepherd_tec_tasks & shepherd_tec_process_task problems.
-
Starting a month ago, a client of mine using The Events Calendar has had repeated issues with the wp_shepherd_tec_tasks database table running away to 100k+ rows and crippling their website.
Upon truncating the table and refreshing any page on their website, I would observe ~20 lines being added to the table on each refresh.
I identified that the shepherd_tec_process_task action was responsible for cleaning up this table (I think), so I dug into that more. It looks like this task typically runs each day to clean up the table, but between 2025-09-29 and 2025-10-06, the task stopped running and the database table inflated.
On 09-29, the last time the task ran successfully, the log was this:
2025-09-28 22:41:31 +0000
action created
2025-09-28 22:41:31 +0000
shepherd_tec||53||created||info||{"message":"Task 53 created.","context":{"current_try":0}}
2025-09-29 04:42:42 +0000
action started via WP Cron
2025-09-29 04:42:42 +0000
shepherd_tec||53||started||info||{"message":"Task 53 starting.","context":{"current_try":0}}
2025-09-29 04:42:42 +0000
shepherd_tec||53||finished||info||{"message":"Task 53 finished.","context":{"current_try":0}}
2025-09-29 04:42:42 +0000
action complete via WP CronSo, it does not look like the task failed. It looks like the problem was that a new shepherd_tec_process_task was not scheduled after the previous task completed.
To resolve this problem (on 10-06), I truncated the table, and deactivated/reactivated the events calendar plugin. This resolved the issue. A new shepherd task was created by the plugin. However I cannot monitor this each day and go through these steps every time the task fails to reschedule itself.
What can I do on my end to resolve this? Even if I have to make my own cron task on the server, I can do that, I just need to know the most future-proof way to handle that. I thought about making my own task to truncate the table, but I’d really prefer some way to check if the plugin’s shepherd task was rescheduled correctly, and if not, manually reschedule it via code.
Or maybe it’s a known bug that could be resolved in a future plugin version. I do not know. Just looking for thoughts from other people in the community.
You must be logged in to reply to this topic.