Problem Statement
Solution
Error - Invalid schedule was specified
All looks fine above, but when I tried to execute the script - there was an error
Why it happened
"Invalid schedule was specified. Please refer to the docs on what constitutes a valid schedule."
The error is quite generic, it's just telling that something is not valid in the provided schedule, but what's wrong?
So tried to validate each subexpression(field) in the cron expression.
First doubt was on min field, is it ok to have single value in min field for two values in hrs field - yes, no issue syntactically
Can we have 2 values in hrs field - yes, no issue syntactically as we can have multiple values in comma separated form
Last piece is Days, SAT-SUN is valid still the error was thrown for it
Why?
The observation after trial and error is that when hrs field has a value then the days in a range form doesn't work i.e. SAT-SUN or MON-FRI etc
But if there is value in only mins field then the days in range form works absolutely fine.
Note : I didn't find any reference for above in snowflake docs
What to do
Knowledge Sharing is Caring !!!!!!