Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <job>
  2. name job1
  3. <notify>
  4. type mail
  5. failure agrawall@amazon.com
  6. </notify>
  7. <command>
  8. echo hello loki
  9. </command>
  10. </job>
  11.  
  12. def time_in_range(start, end, x):
  13. """Return true if x is in the range [start, end]"""
  14. if start <= end:
  15. return start <= x <= end
  16. else:
  17. return start <= x or x <= end
  18.  
  19. <job>
  20. name job2
  21. <notify>
  22. type: mail
  23. <rule>
  24. condition time_in_range(datetime.time(23, 0, 0), datetime.time(1,0,0), datetime.currenttime()
  25. true agrawall@amazon.com
  26. false agrawall@amazon.com
  27. </rule>
  28. </notify>
  29. <command>
  30. echo hello loki
  31. </command>
  32. </job>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement