I'm pretty sure I know the answer, but wanted to ask anyway...
I have a spot VM that gets deallocated every morning, I assume this is due to the need for capacity:
"At any point in time when Azure needs the capacity back, the Azure infrastructure will evict Spot VMs with 30 seconds notice."
All good, but can it be set to restart the VM automatically once the capacity is not needed. Like if my CPU gets to 90%, I can kill some long running process, until the CPU drops back below 10% usage and then restart the process.