I don't think you can do this only using cron. I assume you are using this for an alert so, the way I would approach it is to run every minute between midnight and 3am.
Cron * 0-3 * * *
Then use the custom condition and where command to limit the time. Assuming you were looking for zero events...
where count=0 AND date_hour*100+date_minute>39 AND date_hour*100+date_minute<221
so my savedsearch looks like this
[downtime]
search = heartbeat | stats count by host
enableSched = 1
cron_schedule = * 0-3 * * *
dispatch.earliest_time = -1m@m
dispatch.latest_time = @m
alert.track = 1
alert_condition = where count=0 AND date_hour*100+date_minute>39 AND date_hour*100+date_minute<221
counttype = custom
action.email = 1
action.email.inline = 1
action.email.sendresults = 1
action.email.to =
[email protected]
alert.severity = 4
alert.suppress = 1
alert.suppress.period = 5m
displayview = flashtimeline
request.ui_dispatch_view = flashtimeline
vsid = gq1ya7b9
[edit ref comment]
Oops! Sorry not thinking straight there. Adding the following to your search will do what you want
| where date_hour*100+date_minute>39 AND date_hour*100+date_minute<221
... View more