Even though the implementation is minimal, we are executing a scheduled job every 40 seconds. In your environment, you may have the need to execute one or more jobs on a periodic basis, but more than likely you will have a need to dynamically schedule something or execute a job as a result of another process. So, if your machine learning microservice (oops, early spoiler alert!) fails, you can stop the process and send an alert email or trigger a specific failure job that is defined to handle things when any microservice fails:
![](https://static.packt-cdn.com/products/9781789533682/graphics/assets/b477ee9d-a1eb-4640-b46f-b3c3e91cabc6.png)