I ran into an issue the other day with a customer scheduling an Azure WebJob. When creating a WebJob that will execute on a schedule, crontab syntax is used to define the schedule.
However, Microsoft doesn’t use standard crontab syntax. Typically, the crontab syntax consists of 5 fields with the possible values:
- Minute
- Hour
- Day of the month
- Month
- Day of the week
But Microsoft’s syntax is:
- Second
- Minute
- Hour
- Day of the month
- Month
- Day of the week
Normally, to have a cronjob run every second on a Linux server, you would divide the minute by 60 as follows:
*/60 * * * *
However, with an Azure WebJob you would just write it as:
* * * * * *
It would have been nice to note this in their documentation when setting up an Azure WebJob via Azure Portal.