BUG-11886 When running a case scheduler event every 5 minutes... SOLVED

- The query was executed not taking into account all types "every".
- Add validation.
Merge pull request #1809 from marcoAntonioNina/BUG-11886

BUG-11886 When running a case scheduler event every 5 minutes... SOLVED