Databricks 计划作业的 Cron 表达式
Cron expression for Databricks schedule job
我需要在数据块中安排一项工作,该工作应该在每天早上 6 点、6.15、6.30、6.45、7、7.15、7.30、7.45 和 8 点运行。
我正在使用以下表达式,但它不是 运行早上 8 点。无论如何我们可以实现这个目标吗?
0 0,15,30,45 06,07 ? * *
这是 cron 表达式的预期行为。根据您的要求,您需要为 08:00 编写单独的 cron 表达式,如下所示:
Note that some scheduling requirements are too complicated to express
with a single trigger - such as “every 5 minutes between 9:00 am and
10:00 am, and every 20 minutes between 1:00 pm and 10:00 pm”. The
solution in this scenario is to simply create two triggers, and
register both of them to run the same job.
这将 运行 从 6.00 到 7.45,每 15 分钟:
* 0/15 06-07 * * *
如果你想让它 运行 到 08:00 那么你必须创建两个触发器并注册它们,如果它们到 运行 同一个作业。
* 0/15 06-07 * * *
* 0 08 * * *
参考: Databricks 使用 Quartz Cron 触发器。 Databricks – Cron Triggers
希望这对您有所帮助。
运行 每天两次 10:00 和 18:00
**0 0 10,18/12 * * ?**
http://www.cronmaker.com/;jsessionid=node01kfgs14jy2pa91nxvfa6fs3vnr2008805.node0?0
我需要在数据块中安排一项工作,该工作应该在每天早上 6 点、6.15、6.30、6.45、7、7.15、7.30、7.45 和 8 点运行。
我正在使用以下表达式,但它不是 运行早上 8 点。无论如何我们可以实现这个目标吗?
0 0,15,30,45 06,07 ? * *
这是 cron 表达式的预期行为。根据您的要求,您需要为 08:00 编写单独的 cron 表达式,如下所示:
Note that some scheduling requirements are too complicated to express with a single trigger - such as “every 5 minutes between 9:00 am and 10:00 am, and every 20 minutes between 1:00 pm and 10:00 pm”. The solution in this scenario is to simply create two triggers, and register both of them to run the same job.
这将 运行 从 6.00 到 7.45,每 15 分钟:
* 0/15 06-07 * * *
如果你想让它 运行 到 08:00 那么你必须创建两个触发器并注册它们,如果它们到 运行 同一个作业。
* 0/15 06-07 * * *
* 0 08 * * *
参考: Databricks 使用 Quartz Cron 触发器。 Databricks – Cron Triggers
希望这对您有所帮助。
运行 每天两次 10:00 和 18:00
**0 0 10,18/12 * * ?**
http://www.cronmaker.com/;jsessionid=node01kfgs14jy2pa91nxvfa6fs3vnr2008805.node0?0