# How to schedule Heartbeat for every 30th second of minute

**URL:** https://discuss.elastic.co/t/how-to-schedule-heartbeat-for-every-30th-second-of-minute/185860
**Category:** Beats
**Tags:** heartbeat
**Created:** [June 14, 2019, 1:14pm UTC](https://discuss.elastic.co/t/how-to-schedule-heartbeat-for-every-30th-second-of-minute/185860 "2019-06-14T13:14:33Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![sukku77](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukku77/32/52068_2.png) [@sukku77](https://discuss.elastic.co/u/sukku77)
#### Post date: [June 14, 2019, 1:14pm UTC](https://discuss.elastic.co/t/how-to-schedule-heartbeat-for-every-30th-second-of-minute/185860/1 "2019-06-14T13:14:33Z")

</div>

Hi Guys,  
Can someone help me with configuration of heartbeat for below one:

- I need to schedule heartbeat run using cron expression for every 30th second but not @every 30secs. (like 10:14:30 ,10:15:30 , 10:16:30 and so on)  
Below is my sample heartbeat configuration which is running on every 30seconds, but i need to skip heartbeat to run at 0th second of every minute

Thanks in advance

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [June 14, 2019, 1:57pm UTC](https://discuss.elastic.co/t/how-to-schedule-heartbeat-for-every-30th-second-of-minute/185860/2 "2019-06-14T13:57:20Z")

</div>

Cron syntax doesn't support that. Can I ask what the reason is behind running it on the 30th second?

---

<div class="post-metadata">

### Author: ![sukku77](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukku77/32/52068_2.png) [@sukku77](https://discuss.elastic.co/u/sukku77)
#### Post date: [June 15, 2019, 4:59am UTC](https://discuss.elastic.co/t/how-to-schedule-heartbeat-for-every-30th-second-of-minute/185860/3 "2019-06-15T04:59:22Z")

</div>

Thanks for reply.  
If I need to monitor on single VM then i will use expression like this schedule: '\*/30 \* \* \* \* _'  
But I need to run same heartbeat configuration on two different VM's . And each process should not run on same time but need to capture events for every 30seconds  
Reason for running same heartbeat configuration on two VM's is to increase the availability of heartbeat process if one goes down with any reason.  
So Inorder to accommodate this change, I need to configure as below:  
1st vm: schedule: '_ \* \* \* \*' //which runs on every 0th minute  
2nd vm: schedule: '30th second' //As i am running 1st vm on every 0th minute, i need to config on every 30th minute, but If i configure @every 30secs then it will capture 0th minute event too).

Any workarounds would be great help.

Thanks

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [June 18, 2019, 8:41pm UTC](https://discuss.elastic.co/t/how-to-schedule-heartbeat-for-every-30th-second-of-minute/185860/4 "2019-06-18T20:41:10Z")

</div>

Since uptime checks are so cheap would it be a problem to run both heartbeats with `@every 30s` as the schedule?

---

<div class="post-metadata">

### Author: ![sukku77](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukku77/32/52068_2.png) [@sukku77](https://discuss.elastic.co/u/sukku77)
#### Post date: [June 19, 2019, 8:44am UTC](https://discuss.elastic.co/t/how-to-schedule-heartbeat-for-every-30th-second-of-minute/185860/5 "2019-06-19T08:44:48Z")

</div>

Hi,  
I am able to configure it using below ones and it is working fine

1st vm: schedule '0 \*/1 \* \* \* \* \*'  
2nd vm: schedule '30 \*/1 \* \* \* \* \*'

I hear you regarding running same configuraion on 2 vm's but in my case if health is in alarming condition, then duplicate alerts will be sent to the stakeholders. Anyway thanks for your help

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [June 28, 2019, 11:38am UTC](https://discuss.elastic.co/t/how-to-schedule-heartbeat-for-every-30th-second-of-minute/185860/6 "2019-06-28T11:38:03Z")

</div>

In the future we hope to provide a way to send a single alert in an HA scenario. Sorry we don't have that now.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 26, 2019, 11:38am UTC](https://discuss.elastic.co/t/how-to-schedule-heartbeat-for-every-30th-second-of-minute/185860/7 "2019-07-26T11:38:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
