Fix error when creating Policy Schedule with invalid cron expression
What does this MR do and why?
Recently we've noticed exceptions raised by Security::CreateOrchestrationPolicyWorker
with error Cannot turn nil to a ::EtOrbi::EoTime instance
: https://log.gprd.gitlab.net/goto/16125700-e057-11ec-aade-19e9974a7229.
In this MR we are fixing these errors by validating schedule before creating it and adding missing validation for cron
field.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.