DBTrenches / tsqlscheduler

MIT License
4 stars 1 forks source link

Check for invalid schedule definitions in Test-FolderTasks #10

Open taddison opened 2 years ago

taddison commented 2 years ago

Test-FolderTasks currently passes invalid schedules.

These schedules cannot be created as the scheduler.Task table contains the following check constraint:

constraint CK_FrequencyInterval check ((Frequency='day' and FrequencyInterval=0) or (Frequency in ('Hour', 'Minute', 'Second') and FrequencyInterval>0))

Implementing this check in the function would allow CI builds to correctly fail in the presence of invalid JSON. Today, they'll pass, and it will fail at deployment time.