Hi Christopher!
Currently, this is a very simple service that monitors application operation with a 5-minute interval. Since the decision has been made to improve system reliability as much as possible, the application is deployed in two regions.
It executes a cron job every 10 minutes. However, if there are two instances, the tasks will run at the same time. Based on the value of a system variable:
The first instance works at 0, 10, 20, 30...
The second instance works at 5, 15, 25...
This creates an alternating 5-minute interval for execution. That’s why I was curious about the possibility of modifying their behavior using environment variables.
Since this is a simple service, I just changed the variable value manually through the SSH console. It’s not critical. I was just curious because I know Kubernetes allows for such configurations, which is why I asked.
There are other cases in an application currently being prepared for migration. In that case, I’ll likely follow your advice and move the cron processes to a separate container.