Hello @Coooper
Thank you for reaching out to the Microsoft Q&A platform.
If you are using two Azure VMs with an Azure load balancer, you can use a distributed task scheduler to ensure that the cron job runs only once and on the appropriate VM. This will help you avoid any incorrect matches that may occur due to running the cron job on both VMs.
One way to achieve this is by using a distributed task scheduler like Apache Mesos or Kubernetes. These schedulers can help you manage and distribute tasks across multiple VMs, ensuring that the cron job runs only once and on the appropriate VM.
In addition to using a distributed task scheduler, you can also use a process manager like Supervisor to manage the cron job process on each VM. This will help you ensure that the process is running correctly and can be easily restarted if necessary.
Overall, the key to structuring the backend process when using an additional VM with a load balancer is to use a distributed task scheduler and a process manager to manage and distribute tasks across multiple VMs. This will help you ensure that the cron job runs only once and on the appropriate VM, while also providing you with the necessary tools to manage and monitor the process.
Please accept answer and upvote if the above information is helpful for the benefit of the community.