Daily time based function

I’d like to create a function that sends an email to Admin users every 24 hours. To date, all of the functions I’ve built have been triggered by user actions, ie. onClick.

I would like the app to fire this automatically. Can someone point me in the right direction of how to do this in meteor.

Is it something to do with setInterval or meteor Timers and where would you put this in an app?

Look into meteor synced cron: https://github.com/percolatestudio/meteor-synced-cron or something more reliable like a AWS lambda call that queries the DB for all admin users and sends them an email every 24 hours.

1 Like