Currently I'm developing a Node.js application that will run inside a Raspberry.
The application fetches posts data from an API, where each post has it's own start/end date and times.
I need to know when the start/end time is reached so I can run some code. How could I handle that on Node.js? Right now, I created a service with setInterval() that runs every 10 seconds for each post, and checks if it should run the code or not. However, I was wondering if there are any other solutions for this problem.
Is the solution I currently have bad? Or CPU intensive/memory intensive?