CRON JOB to remove old events.

2 posts by 2 authors in: Forums > CMS Builder
Last Post: November 14, 2017   (RSS)

By Dave - November 14, 2017

Hi Zicky, 

It looks good to me at first glance.  What I'd recommend for debugging this is to install the Developer Console: 
https://www.interactivetools.com/add-ons/developer-console/

And then test your query in the MySQL Console as a select:

SELECT * FROM events WHERE `createdDate` < TIMESTAMP( DATE(NOW() - INTERVAL 7 DAY)

And confirm that you're getting matches that way.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com