Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <job>
- name job1
- <notify>
- type mail
- failure agrawall@amazon.com
- </notify>
- <command>
- echo hello loki
- </command>
- </job>
- def time_in_range(start, end, x):
- """Return true if x is in the range [start, end]"""
- if start <= end:
- return start <= x <= end
- else:
- return start <= x or x <= end
- <job>
- name job2
- <notify>
- type: mail
- <rule>
- condition time_in_range(datetime.time(23, 0, 0), datetime.time(1,0,0), datetime.currenttime()
- true agrawall@amazon.com
- false agrawall@amazon.com
- </rule>
- </notify>
- <command>
- echo hello loki
- </command>
- </job>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement