You can use a Powershell script to watch for a program and restart it when it's not running.
while ($true) { #infinite loop
$Procs = Get-Process notepad -ErrorAction SilentlyContinue # how many are running?
if (($procs).Count -eq 0) {
"{0} - Notepad is not running" -f (Get-Date)
Start-Sleep -Seconds (3 * 60) # wait for 3 minutes
Start-Process notepad.exe # start a new instance
"{0} - Notepad was started." -f (Get-Date)
}
Start-Sleep -Seconds 30 # delay for a while until we need to check again
}
Beyond that, your question is just too simplistic. You really should provide more details of the overall problem that you are trying to solve.