Cron job to consistently reboot a VM on TrueNAS CORE

midclt call vm.query | jq

to find the id of your VM, then

midclt call vm.restart <id>

Thanks to @Samuel_Tai who posted this solution on the old forum.