Time based triggers

What’s the best way to deal with time based triggers in meteor?
setTimeout ?? I think there are probably better ways… Can you suggest me something?
For example I want to check if a user is inactive after two weeks.
I simply should check if he hasn’t created anything from the db. That’s ok. But how can I trigger that check after 2 weeks?

Meteor timers are good, but they run on each server, so there’s a chance your function would run multiple times unless you devise a way to prevent it.

You might be interested in using a job queue to schedule things for a future date. Here’s one option:

3 Likes