Run only once in Multiple VMs

The web application is deployed in multiple vms. let's say 3. There is a scheduler program which is retrieving data from database and do processing. The three vms doing at the same time resulting in processing thrice.

How can I make only VM run?