# Setting notification interval for specific service only works for 24 hours

**URL:** <https://community.icinga.com/t/setting-notification-interval-for-specific-service-only-works-for-24-hours/1831>\
**Category:** Icinga 2\
**Tags:** notifications, icinga2\
**Created:** [July 30, 2019, 12:33pm UTC](https://community.icinga.com/t/setting-notification-interval-for-specific-service-only-works-for-24-hours/1831 "2019-07-30T12:33:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![plumel](https://community.icinga.com/letter_avatar_proxy/v4/letter/p/858c86/32.png) [@plumel](https://community.icinga.com/u/plumel)\
**Post date:** [July 30, 2019, 12:33pm UTC](https://community.icinga.com/t/setting-notification-interval-for-specific-service-only-works-for-24-hours/1831/1 "2019-07-30T12:33:24Z")

</div>

Hi there,

I currently have a notification object:

```auto
apply Notification "mail-icingaadmin" to Service {
  import "mail-service-notification"
  user_groups = host.vars.notification.mail.groups
  users = host.vars.notification.mail.users
  if (service.check_command == "yum") {
    interval = 24h
  }
  assign where host.vars.notification.mail && host.vars.emergency
}

```

This worked for 24 hours. After that, the notifications came back and are back to sending every 30 minutes now.

Does anyone have an idea on why this might be the case?

---

<div class="post-metadata">

**Author:** ![dnsmichi](https://community.icinga.com/user_avatar/community.icinga.com/dnsmichi/32/7721_2.png) [@dnsmichi](https://community.icinga.com/u/dnsmichi)\
**Post date:** [July 30, 2019, 1:33pm UTC](https://community.icinga.com/t/setting-notification-interval-for-specific-service-only-works-for-24-hours/1831/2 "2019-07-30T13:33:21Z")

</div>

A post was merged into an existing topic: [Set notification interval for specific service](https://community.icinga.com/t/set-notification-interval-for-specific-service/1789)

---

<div class="post-metadata">

**Author:** ![dnsmichi](https://community.icinga.com/user_avatar/community.icinga.com/dnsmichi/32/7721_2.png) [@dnsmichi](https://community.icinga.com/u/dnsmichi)\
**Post date:** [July 30, 2019, 1:33pm UTC](https://community.icinga.com/t/setting-notification-interval-for-specific-service-only-works-for-24-hours/1831/3 "2019-07-30T13:33:22Z")

</div>


