Shekhar Manna
Shekhar Manna

Reputation: 5

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?

Upvotes: 0

Views: 581

Answers (2)

McGuireV10
McGuireV10

Reputation: 9926

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.

Upvotes: 1

DasDave
DasDave

Reputation: 811

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

Upvotes: 0

Related Questions