Server-side scheduling in Node.js

Viewed 25

I'm looking for a simple server-side scheduling function in Node.js. I'm using Node.js, Express with PostgresSQL as my back-end and ejs as my templating solution. I'm new to coding and have only started a few months ago. The app takes betting orders from the users. The orders have an expiration date and are stored in a Postgres db.

I can't figure our how to create a server side scheduling job or function that checks these orders and send a message to the users that their order has expired. I can do it on the client-side with Ajax and setInterval but this is bad design in my opinion. Is there a simple way to do it on the server-side without overloading the server or hindering performance? The minimum expiration period is 30mins.

0 Answers
Related