a process uptime test ist available, seehttps://mmonit.com/monit/documentation/monit.html#UPTIME-TEST
The uptime test is availabel for the process and system service
> Example of restarting the process every three days:
> check process myapp with pidfile /var/run/myapp.pid
> start program = "/etc/init.d/myapp start"
> stop program = "/etc/init.d/myapp stop"
> if uptime > 3 days then restart
The test is available since some years (I find the test in Monit 5.16).
Check the used Monit version with the command "monit -V".