简体   繁体   中英

How to Schedule azure web job with 2 different Cron expression

I have Created python azure webjob which I want to trigger twice - 1st is daily @2 am and second is every Saturday @ 4 am.

How can I achieve this in a single cron expression?

Below is my current cron expression file looks like:

{"schedule":"0 0 14 * * *"}
  • As @ThiagoCustodio Said is correct that it is not possible to allow two schedules in one CRON expression and you have to create two Web jobs for achieving your requirement.

  • It can be a WebJobs or Functions in the Azure Function, two instances required for 2 different schedules.

  • In this SO # 57211407 , the user @GeorgeChen given 3 ways for implementing multiple CRON expressions in Azure Web Jobs with the practical code examples. Those ways are Multiple Static Web Job Methods in Azure Timer Triggered Function, Custom Schedule Class file, and abstract class custom schedule r in Azure Web Jobs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM