Watcher with multiple Trigger Schedules

I am currently setting up watchers for my Elasticsearch indices. When trying to setup the trigger schedule, I tried to add multiple different schedules, e.g. a weekly schedule and a monthly schedule. However, after saving the watcher, only one schedule is saved and all the other ones are gone.

E.g.
I want to create the following schedule:

"trigger": {
    "schedule": {
      "weekly" : [
        { "on" : "friday", "at" : "17:00" }
      ],
      "monthly" : [
        { "on" : 1, "at" : "12:00" }
      ]
    }
  }

when I now save this watcher, the resulting watcher has only the following schedule:

"trigger": {
    "schedule": {
      "monthly" : [
        { "on" : 1, "at" : "12:00" }
      ]
    }
  }

The weekly schedule is gone.

Is it not possible to create a watcher with multiple different schedule types?
I mean, I could just create multple cron expression for the different schedules, so why should it not be possible to have multiple different schedule types?

Or am I doing something wrong?

Note: I am using Elasticsearch 7.12.1

you can only set a single schedule per watch (like monthly or weekly). However this should throw an error if the watch tries to get stored. Feel free to open an issue in the Elasticsearch GitHub Repository at Issues · elastic/elasticsearch · GitHub

Thanks!

Ok, thanks for the info.
I was creating the watcher using the Kibana UI and there it did not return any errors, it simply left out one schedule.

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