You create an Azure function that runs on a schedule for a data update.
Your company has several offices.
You need to schedule this function to run for Office One at 11:45 pm on Tuesday and Wednesday, for Office Two at midnight on Sunday, and for Office Three at 10:11 am on weekends.
Please select the time schedules for the three offices.
Click on the arrows to vote for the correct answer
A. B. C. D. E. F. G.Correct Answers: C, E and F
For creating an Azure function that runs on schedule, you need to use a Timer trigger template for the function.
If you use the Azure portal, you can provision a Function App (Number 1) and then add a function by clicking the Functions menu item (Number 2)
The portal opens the “Add function” panel (Number 3), where you can select the “Timer trigger” template (Number 4), provide a name for the New Function (Number 5), and a Schedule expression in NCRONTAB notation (Number 6).
The NCRONTAB notation is similar to CRON but has a six field expression instead of five.
The additional field is the second field in front of the expression: {second} {minute} {hour} {day} {month} {day-of-week}
Option C is correct because the NCRONTAB statement “0 0 0 * * 0” means to run Azure Function at 00:00 (12 am or midnight) on Sunday (the last 0 is Sunday).
Option E is correct because the NCRONTAB statement “0 11 10 * * 6,0” means to run Azure Function at 10:11 (10:11 am) on the weekends (6 is Saturday and 0 is Sunday).
Option F is correct because the NCRONTAB statement “0 45 23 * * 2-3” means to run Azure Function at 23:45 (11:45 pm) on Tuesday and Wednesday (2 is Tuesday and 3 is Wednesday).
Option A is incorrect because the NCRONTAB statement “0 45 11 * * 2-3” means to run Azure Function at 11:45 (11:45 am) on Tuesday and Wednesday (2 is Tuesday and 3 is Wednesday).
Option B is incorrect because the NCRONTAB statement “0 0 0 * * 6,0” means to run Azure Function at 00:00 (12 am or midnight) on the weekends (6 is Saturday and 0 is Sunday).
Option D is incorrect because the NCRONTAB statement “0 0 0 * * 1-5” means to run Azure Function at 00:00 (12 am or midnight) on weekdays (from Monday (1) till Friday (5)).
Option G is incorrect because the NCRONTAB statement “0 10 11 * * 6,0” means to run Azure Function at 11:10 (11:10 am) on the weekends (6 is Saturday and 0 is Sunday).
For more information about the Timer triggered Azure Functions, please visit the below URLs:
The schedules for the three offices are:
Let's break down each schedule and find the corresponding cron expression:
For Office One:
0 45 23 * * 2-3
For Office Two:
0 0 0 * * 0
For Office Three:
0 11 10 * * 6,0
Therefore, the correct answers are:
F. 0 45 23 * * 2-3 for Office One C. 0 0 0 * * 0 for Office Two E. 0 11 10 * * 6,0 for Office Three