I'm implementing an application that's made of bunch of microservices. Each of them is fairly simple, focusing on its own task. Let's call two of them
Service A and
Service B. They are both implemented in NodeJs and expose a Rest API. Now I need to run couple of cron jobs (some at 1m interval, others at 5m, 1h and so on) and I need to pass data from one service to another. For example I need data from
Service A, call an external API, process the data and
POST it to
I thought of using another microservice called
Task Master in this example, that would do this cron job and all the others (for all the services in the application), therefore being master of all the cron jobs.
- Is this a bad idea ? One microservice just for cron jobs ? And all the cron jobs ?
- What would be the best way to implement this ? Could it be another NodeJs app ?