Azure WebJob不接受有效的(?)CRON表达式 [英] Azure WebJob not accepting a valid(?) CRON expression

查看:503
本文介绍了Azure WebJob不接受有效的(?)CRON表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用



对我来说,在





问题..




  • 差异在哪里?

  • Microsoft是否以传统的方式拥有一个带有前导零的专有
    实现?

  • 如果标准是分钟小时日期月平均日
    前导零描述是什么?


解决方案

请查看文档:






CRON表达式由以下6个字段组成:{second} {minute}


因此,前面的0表示秒。

  * * * * * *要执行的命令
┬┬┬┬┬┬
│││││ │
│││││││
││││││└────星期(0 - 7)(0或7是星期日,或使用名称)
│ │││└────────月(1 - 12)
│││└───────月(1 - 31) )
│| └────────────小时(0 - 23)
│└───────── ───────min(0 - 59)
└──────────────second (0 - 59)


I used crontab.guru to create a very simple CRON expression with the desired behavior to execute every day at 3:15 (AM) and this is the result: 15 3 * * *

Unfortunately for me, in Azure Portal this does not work, but if I add a leading 0 to my expression as such, 0 15 3 * * *, Azure will accept it, while crontab.guru will tell me it is wrong. The specification according to crontab.guru is: minute hour date month weekday.

The questions..

  • From where comes the discrepancy?
  • Is it Microsoft that in their traditional ways have a proprietary implementation with a leading zero?
  • If the standard is minute hour date month weekday, what does the leading zero describe?

解决方案

Have a look at the documentation:

The CRON expression is composed of 6 fields: {second} {minute} {hour} {day} {month} {day of the week}.

So the first 0 describes the seconds.

*    *    *    *    *    *  command to be executed
┬    ┬    ┬    ┬    ┬    ┬
│    │    │    │    │    │
│    │    │    │    │    │
│    │    │    │    │    └───── day of week (0 - 7) (0 or 7 are Sunday, or    use names)
│    │    │    │    └────────── month (1 - 12)
│    │    │    └─────────────── day of month (1 - 31)
│    |    └──────────────────── hour (0 - 23)
│    └───────────────────────── min (0 - 59)
└────────────────────────────── second(0 - 59)

这篇关于Azure WebJob不接受有效的(?)CRON表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆