Quartz cron expressions are failing with a message that is not clear.
Error:
Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.Timer'. mscorlib: String was not recognized as a valid TimeSpan.
Quartz cron expression used (run every day at midnight):
0 0 0 1/1 * ? *
Expression build with http://www.cronmaker.com/
We use the NCronTab library, and we use the 6 field format. The expression you give above has 7 fields so is invalid. See the NCronTab documentation for more information.
The reason you're getting that error message is because we first try to parse as a cron expression, then fall back to trying to parse as a TimeSpan. I agree that error message can be improved, and I logged an issue for that here.
Better error message has been checked in: https://github.com/Azure/azure-webjobs-sdk-extensions/commit/8c2f6ad115332f638a1cbfe3255b9a5129f0b015
Most helpful comment
We use the NCronTab library, and we use the 6 field format. The expression you give above has 7 fields so is invalid. See the NCronTab documentation for more information.
The reason you're getting that error message is because we first try to parse as a cron expression, then fall back to trying to parse as a TimeSpan. I agree that error message can be improved, and I logged an issue for that here.