On Wed, Aug 06, 2014 at 03:42:45PM +0000, Peter C. Valentien wrote:
> I have a group of processes for which I wish to start and stop the monitoring 
> in cron as follows:
> 
> 10 08 * * 1-5   /usr/bin/monit -g trading_call monitor
> 30 17 * * 1-5   /usr/bin/monit -g trading_call unmonitor

Why don't you just configure the times when you want the services to be
monitored in your monitrc, as described in [1]?
Your start and stop times can't be combined in a single configuration
line in Monit (at least not in any way I'm aware of), but this should
work for you:

  check <whatever>
    every "10-59 8 * * 1-5"
    every "* 9-16 * * 1-5"
    every "0-30 17 * * 1-5"


Regards,
Nils

[1]: http://mmonit.com/monit/documentation/monit.html#service_poll_time

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to