Scheduling POST requests for users in express?

I have an express server that talks to a mongo database of users. Each user has a momentjs object that includes a time + timezone. I would like to send a POST command every day when that time hits for each user in their time zone. I'd also like to be able to update a user's time as needed.

What is the best way to do this? I was going to use node-schedule: https://www.npmjs.com/package/node-schedule but it seems difficult/impossible to cancel jobs in a reasonable manner.

Thanks for your help!

Posted Aug 29, 2016, 10:57 PM UTC

21
Loading comments…