You should always confirm that the cron schedule expression is valid or your jobs won't be executed.
Targeted resources by this rule (types of
Enabled by default? True
Policy as code identifier: CRONJOB_INVALID_SCHEDULE_VALUE
This rule will fail
schedule value is not a valid cron expression
schedule: "1 * * *"
Rule output in the CLI
$ datree test *.yaml
>> File: failExample.yaml
❌ Ensure CronJob scheduler is valid [1 occurrence]
💡 Incorrect value for key `schedule` - the (cron) schedule expressions is not valid and, therefore, will not work as expected
How to fix this failure
Specify a valid cron expression
schedule: "*/1 * * * *"