Azure Function Schedule for Multiple Offices
Question
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.
Answers
Explanations
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).
![® Search resources, services, and docs (6+/)
++ Create a resource
@ Home
Eq) Dashboard
All services
o® FAVORITES
EEE All resources
(>) Resource groups
® App Services
“> Function App
@ sai databases
© Azure Cosmos DB
© Virtual machines
® Load balancers
S storage accounts
<> Virtual networks
> Azure Active Directory
© Monitor
® Advisor
© Security Center
© Cost Management + Billing
B Help + support
“© Subscriptions
Dashboard > Microsoft.\Web-FunctionApp-Portal
{f4 cbppl | Functions
Function App
£ Search (Cmd+/)
®& Overview
Activity log
a Access control (IAM)
@ Tags
@ Diagnose and solve problems
@ Security
& Events (preview)
Functions
(8) Functions 2)
© App keys
TZ App files
> Proxies
Deployment
= Deployment slots
@ Deployment Center
@ Deployment Center (Classic)
Settings
I! Configuration
Authentication
Authentication (classic)
Application Insights
eo 7
Identity
Backups
Custom domains
el ®
TLS/SSL settings
+ add ©) Refresh
[ii] Delete
# Filter by name...
Name ?
No results.
Trigger Ty
Add function @ x
Select a template
Use a template to create a function. Triggers describe the type of events that
invoke your functions. Learn more
VY Filter
Template Description
A function that will be run whenever it receives an
HTTP request, responding based on data in the
HTTP trigger
Timer trigger A function that will be run on a specified schedule
SU, 4
added to a specified Azure Storage queue
Raure Gueue Storage tigger
‘Aaure Service Bus Queue A function that will be run whenever a message is
trigger added to a specified Service Bus queue
Azure Service Bus Topic A function that will be run whenever a message is
trigger added to the specified Service Bus topic
Azure Blob Storage trigger A function that will be run whenever a blob is
added to a specified container
Template details
We need more information to create the Timer trigger function. Learn more
New Function*
CBTimer 5)
Schedule*O
000**O0 ©](https://eaeastus2.blob.core.windows.net/optimizedimages/static/images/Microsoft-Power-Platform-Developer-(PL-400)/answer/imgckeditor_14_48_51.jpg)
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:
- Office One: 11:45 pm on Tuesday and Wednesday
- Office Two: midnight on Sunday
- Office Three: 10:11 am on weekends
Let's break down each schedule and find the corresponding cron expression:
For Office One:
- Run at 11:45 pm on Tuesday and Wednesday
- The cron expression for this schedule is
0 45 23 * * 2-3
- Explanation: This translates to "run at minute 0, hour 23 (11 PM), on days 2 and 3 (Tuesday and Wednesday) of any month"
For Office Two:
- Run at midnight on Sunday
- The cron expression for this schedule is
0 0 0 * * 0
- Explanation: This translates to "run at minute 0, hour 0 (midnight), on day 0 (Sunday) of any month"
For Office Three:
- Run at 10:11 am on weekends
- The cron expression for this schedule is
0 11 10 * * 6,0
- Explanation: This translates to "run at minute 0, hour 10 (10 AM), on days 6 and 0 (Saturday and Sunday) of any month"
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