Where to perform update activity each X days

Hi,

I’m trying to migrate an old application of mine. In this application there is some event types with a frequency. Each X days (X can be different for every event), I want to create a new event for this event type. In my SQL application, each time I get the events from the DB, I was looking in each events and creating a new one if the date was in the past.

But here in Meteor I’m afraid, it’s going to check very frequently the date.

Where I can do this check and the update and avoid this function to be fired every time the list of events is refreshed?

Thanks!

Instead of tying this to the retrieval of your events list, maybe you can consider using a scheduled process to routinely check for expired events, and create new ones as needed. If something like this could work, take a look at the percolate:synced-cron package.

Well it’s true… Each hour I can launch this script… Thanks!