# How to setup a snooze schedule except 1st day of quarter beginning

**URL:** <https://discuss.elastic.co/t/how-to-setup-a-snooze-schedule-except-1st-day-of-quarter-beginning/368568>\
**Category:** Elastic Observability\
**Tags:** elastic-stack-monitoring\
**Created:** [October 9, 2024, 8:44pm UTC](https://discuss.elastic.co/t/how-to-setup-a-snooze-schedule-except-1st-day-of-quarter-beginning/368568 "2024-10-09T20:44:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajeshbabun](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@ajeshbabun](https://discuss.elastic.co/u/ajeshbabun)\
**Post date:** [October 9, 2024, 8:44pm UTC](https://discuss.elastic.co/t/how-to-setup-a-snooze-schedule-except-1st-day-of-quarter-beginning/368568/1 "2024-10-09T20:44:27Z")

</div>

I have a rule that search for data using Elasticsearch query for a job runs at 6:00 AM of 1st day of quarter beginning. So want this rule to be snoozed every day except 6:00 AM to 6:30 AM on 1st day of every quarter beginning (Jan 1st, April 1st, July 1st and Oct 1st)

Can someone suggest how to setup snooze schedule for this scenario

---

<div class="post-metadata">

**Author:** ![atul\_mohan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atul_mohan/32/137776_2.png) [@atul\_mohan](https://discuss.elastic.co/u/atul_mohan)\
**Post date:** [January 25, 2025, 4:57pm UTC](https://discuss.elastic.co/t/how-to-setup-a-snooze-schedule-except-1st-day-of-quarter-beginning/368568/2 "2025-01-25T16:57:57Z")

</div>

```auto
{
  "rule": {
    "name": "Quarter Start Data Check",
    "type": ".es-query",
    "params": {
      "searchType": "searchSource",
      "index": ["your-index-*"],
      "query": {
        "query": "your_query_here"
      },
      "timeWindowSize": 30,
      "timeWindowUnit": "m",
      "thresholdComparator": ">",
      "threshold": [0]
    },
    "schedule": {
      "interval": "1d" // Check every day, but this will be controlled by snooze schedule
    },
    "snooze_schedule": {
      "rRule": {
        "freq": "DAILY",
        "byhour": [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],
        "byminute": [0, 30, 60], // Exclude 6:00 AM to 6:30 AM
        "byday": ["MO", "TU", "WE", "TH", "FR", "SA", "SU"],
        "bymonthday": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31], // Exclude 1st of each month
        "bymonth": [1, 4, 7, 10] // Only January, April, July, and October
      },
      "duration": 86400000 // 24 hours duration
    }
  }
}

```

freq: "DAILY" - The rule checks daily by default but will be snoozed or unsnoozed based on conditions.  
byhour, byminute - These exclude the time window you want the rule to be active (6:00 AM - 6:30 AM is missing from the list).  
byday - Ensures it checks every day of the week.  
bymonthday - Excludes the first day of the month (you want the rule active only on the 1st).  
bymonth - Limits to the first month of each quarter.
