I would be more inclined for a solution that notifies someone when a server component goes down so that the root-cause can be determined and removed, instead of automatically trying to restart something. Very likely it will go down again if the root cause is not removed.
I find that if your installation is properly configured the server components like Registry, VSE, … are quite stable and don’t often need restarting.
I would however recommend that they are proactively restarted example during a weekend when not in use. (see task scheduler discussion below)
Are the devtest components so unstable in your environment? If so, any suspicion why?
Anyways, back to your actual question.
What is your server operating system, Unix/Linux? Or Windows?
You will need a task scheduler, the obvious candidate for Unix/linux is cron. Windows also comes with its own in-build Task Scheduler (you can find it under System Administration). With this you can run a script every x minutes.
You will need to code a script.
For Unix/Linux your script can work by calling the /bin directory, e.g. CoordinatorService, VirtualServiceEnvironmentService, … You can call these with parameter status – e.g. “CoordinatorService status” - and it will report “Running” or “Stopped”. You can call these with “start” and the service will be started again.
For Windows, it will be different (executing “CoordinatorService.exe status” gives back nothing). I would go for a PowerShell script, and use the Get-Service command in there. Check this link to find already a powershell script that seems to do what you want https://social.technet.microsoft.com/Forums/lync/en-US/79bf9de7-1c17-45c0-a02b-7558af89807a/powershell-script-to-check-service-status?forum=ITCG
Cheers,
Danny