Add checking "is format of expression valid"
Faced out problem when did mistake in weeklyOn() method, just forgot to specify $day param:
->weeklyOn('11:25'). Such call was converted to 0 0 * * 11:25 and it's invalid format.
And as a result all tasks after this didn't work at all! And there were no visible errors, it stop somewhere under the hood of cron (I guess).
Would be very useful to have auto-check of cron expression and trigger error if there is a problem and don't run problematic task.
Thanks. :)
Hello, all i can do now is to show deprecation notice in v2.1 and throw exception in v3.0 in case someone passes wrong Cron expression. WDYT?
Exception in v3.0 sounds cool! :) Sorry for long reaction, I missed your answer.
Actually, I've tested it and proper exception [InvalidArgumentException] Invalid CRON field value 11:25 at position 4 is shown, what version of Crunz do you use?