POST _watcher/watch/_execute
{
"watch": {
"trigger": {
"schedule": {
"interval": "10h"
}
},
"input": {
"simple": {
"foo": "bar"
}
},
"condition": {
"script": "return ctx.trigger.triggered_time.getDayOfWeekEnum() == DayOfWeek.MONDAY"
},
"actions": {
"logme": {
"logging": {
"text": "{{ctx.trigger.triggered_time}}"
}
}
}
}
}
You can also check for the hour of the day like ctx.trigger.triggered_time.hour > 5