简体   繁体   中英

Azure function CRON Schedule expression

If I wish to run my function app at 11.15 PM to next day 1.15 AM(That mean MONDAY 11.15 PM start and TUESDAY 1.15 AM will end) and it will trigger every minute during this time.

Can anyone help me to write this CRON expression?

You'll have to do this in three lines I think,

15-59 23 * * *
* 0 * * *
0-15 1 * * *

This will run it from 23:15-23:59 then 00:00-00:59 then 1:00-1:15

The timer triggers are designed for a single repeating interval. The only way to do this completely within a Function is to run the trigger once per minute, then abort if the current time isn't in the desired target time period.

Alternately, put your logic into an HTTP trigger configured to act as a webhook , then use an Azure scheduler to configure start and stop times and intervals.

You won't be able to use the scheduler free plan since it can only run once per hour, but the standard plan can run once per minute. Scheduler pricing here .

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