Exam PL-400 All QuestionsBrowse all questions from this exam
Question 222

HOTSPOT -

You work for a multinational company that has Azure and Microsoft Dataverse environments in the United States (UTC-7) and Japan (UTC+9).

You create Azure Functions for each location to update key data.

You need to configure the functions to run at 4:00 AM on weekdays at each location.

Which schedule formats should you use? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Hot Area:

    Correct Answer:

    Box 1: 0 0 4 * * 1-5 -

    Azure Functions uses the NCronTab library to interpret NCRONTAB expressions.

    An NCRONTAB expression is similar to a CRON expression except that it includes an additional sixth field at the beginning to use for time precision in seconds:

    {second} {minute} {hour} {day} {month} {day-of-week}

    NCRONTAB time zones -

    The numbers in a CRON expression refer to a time and date, not a time span. For example, a 5 in the hour field refers to 5:00 AM, not every 5 hours.

    The default time zone used with the CRON expressions is Coordinated Universal Time (UTC).

    To have your CRON expression based on another time zone, create an app setting for your function app named WEBSITE_TIME_ZONE.

    1-5 is weekdays

    Box 2: 0 0 4 * * 1-5 -

    Reference:

    https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer

    ?

Discussion
mastaace

Since the question doesn't specify that an app setting has been created for the time zone, everything is UTC. Therefore, the answer should be US: 0011 ** 1-5, Japan: 0019 ** 0-4

tmc51

Gotta love a 50/50

yajof40649

The function must run on weekdes so it must be 1-5

Violoncello

1900 hours from Sunday to Thursday UTC translates to 0400 hours Monday to Friday in Japan.

Hendrikdb

there is only one way to determine weekday scheduling in CRON and that is 1 - 5. So the original answer is correct.

powerMaster

I am totally with you. As long as WEBSITE_TIME_ZONE is not set you need to concider that the function is in UTC!

Aby104

Answer is correct

Ming888

(UTC-7) US Mon 11am -7 hours = (UTC) Mon 4 AM 0 0 11 * * 1-5 (UTC+9) Japan Sun 7pm + 9 hours = (UTC) Mon 4 AM 0 0 19 * * 0-4

KenCraw

They way you laid it out finally makes sense , wish I could remove my old comment... I came at it from the opposite direction (I went the wrong direction in time)

ZVV

For days, the numeric values are 0 to 6 where 0 starts with Sunday. And Sundays definitely are not work(week)days. So this answer does not fit the requirement. SO I believe we need to believe they have WEBSITE_TIME_ZONE for sites

ZVV

Moreover - your calculations are just incorrect :) 9PM US = 4AM UTC = 1PM Japan

ZVV

Oh, sorry, my bad :( nevermind

_WMC_

4:00 am US (UTC-7) = 1100 UTC 4:00 am JAPAN (UTC+9) = 1900 UTC *of the previous day* So assuming that there is *NOT* a WEBSITE_TIME_ZONE setting the correct answers for each would be: US: 0 0 11 * * 1-5 (4am Monday US is 11am Monday UTC) JAPAN 0 0 19 * * 0-4 (4am Monday Japan is 7pm Sunday UTC)

S41

1. Azure instance is available in both the locations - US and Japan 2. The functions should run only on weekdays The configuration should be 4 AM in US and 4 AM in Japan respectively on its Azure instances. Though in effect the functions will run at different times. No need of calculation then, (0 0 4 * * 1-5) seems right answer.

ETU69

This is the correct answer. (0 0 4 * * 1-5) for both, US and Japan Azure Instances. Both with the default time zone used with the CRON expressions.

fcisSara

Answer should be US: 0011 ** 1-5, Japan: 0019 ** 0-4

KenCraw

Environments in both places and set up for each location. Added to this that 4:00AM - 7 is 9PM (21), +9 is 1PM (13), since both 21 + 13 are not options in the hour section. I am inclined to go with given answers {second} {minute} {hour} {day} {month} {day-of-week}

KenCraw

Sorry everyone, had a mixup in logic... Please see Ming888's comment for clarity on answer + why

Mnarmeen

Can anyone please confirm the right answers?

Uiey

https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=in-process&pivots=programming-language-csharp

ziggy1117

answers are correct!

Uiey

The given answers are correct. https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=in-process&pivots=programming-language-csharp

LSgeek

United State : 0 11 * * 1-5 Japan : 0 19 * * 1-5

jkaur

answers are correct

DimpleG

For the US Azure Function, you should use 0 0 4 * * 1-5 to run the function at 4:00 AM every Monday through Friday. For the Japan Azure Function, you should use 0 0 4 * * 1-5 to run the function at 4:00 AM every Monday through Friday in Japan, which is 4:00 PM on Sunday UTC. You are correct that the schedule will be translated to 4 AM in UTC, but the schedule should be set according to the local time of each location.

DimpleG

For the US Azure Function, you should use 0 0 4 * * 1-5 to run the function at 4:00 AM every Monday through Friday. For the Japan Azure Function, you should use 0 0 4 * * 1-5 to run the function at 4:00 AM every Monday through Friday in Japan, which is 4:00 PM on Sunday UTC. You are correct that the schedule will be translated to 4 AM in UTC, but the schedule should be set according to the local time of each location.

luvasgloves

Is UTC or is the settings set? Tricky question.

Violoncello

This is indeed a tricky question. There are 2 clues: USA (UTC - 7) and Japan (UTC + 9). Or are they unnecessary bits of information? This question is therefore AMBIGUOUS.

FDC

I agree with mastaace should be US: 0011 ** 1-5, Japan: 0019 ** 0-4