I have to design a system where I need to make some processing (which might take say 10 mins). After some amount of time (say 30 mins), I need to come back and check the status of this processing and possibly stop any further processing.There would be multiple such processes fired and running sequentially or in parallel. Each would have a different processing time, and each would have a different 'stop' time.One way is that this would be a cronjob which comes back every 30 mins and checks the processing component.My solution is currently designed on NodeJS and I intend it to be stateless. I am running a callback in a interval of 10 mins to check for the final state.What I want to know is how are such systems designed? Is there a better alternative to having a cron job and / or continuously polling for the state of a processing. How would you do this? If I am being too vague in the requirement, please let me know and I can add in more details.
How to to design a cronjob-like requirement
design;node.js;polling;cron