exam questions

Exam AZ-301 All Questions

View all questions & answers for the AZ-301 exam

Exam AZ-301 topic 6 question 13 discussion

Actual exam question from Microsoft's AZ-301
Question #: 13
Topic #: 6
[All AZ-301 Questions]

Note: This question is part of series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You are migrating an on-premises application to Azure. One component of the application is a legacy Windows native executable that performs image processing.
The image processing application must run every hour. During times that the image processing application is not running, it should not be consuming any Azure compute resources.
You need to ensure that the image processing application runs correctly every hour.
Solution: Create an Azure Function to run the image processing application every hour.
Does the solution meet the goal?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
Instead use an Azure Logic Apps, which helps you automate workflows that run on a schedule.
References:
https://docs.microsoft.com/en-us/azure/logic-apps/tutorial-build-schedule-recurring-logic-app-workflow

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Ekramy_Elnaggar
Highly Voted 5 years, 5 months ago
Should be Yes , if you choose "Consumption Plan" https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale
upvoted 16 times
Moon
5 years, 4 months ago
Referring to the above link, "When you're using the Consumption plan, instances of the Azure Functions host are dynamically added and removed based on the number of incoming events." So, the function app, will not be triggered every hour (if consumption plan is used). Referring to the below link: https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-scheduled-function The hourly trigger can be configured in the "Function Apps" itself! Therefore, the answer is "Yes" fro my point of view, without the need for "Consumption Plan" (which has to deal with Compute flexibility).
upvoted 2 times
Moon
5 years, 4 months ago
My only worry is that, whether the Function App can execute the "legacy Windows native executable" action!! So, for me the answer is still not confirmed "Yes". Considering that Logic App, might be able to trigger the "legacy Windows native executable" files through CRON jobs, or other way, as in the below link scheduling steps: https://docs.microsoft.com/en-us/azure/logic-apps/tutorial-build-schedule-recurring-logic-app-workflow
upvoted 5 times
azurecert2021
4 years, 4 months ago
it can execute .exe as well https://docs.microsoft.com/en-us/samples/azure-samples/functions-dotnet-migrating-console-apps/run-console-apps-on-azure-functions/ https://stackoverflow.com/questions/45348498/run-exe-executable-file-in-azure-function
upvoted 4 times
...
...
...
Rajuuu
5 years, 1 month ago
The Answer is No. The above link does not mention about the Scheduler which is a key part of the Solution recommendation..
upvoted 1 times
Wildsheep
4 years, 11 months ago
You can set up a timer with a CRON excursion to trigger function and run on a schedule
upvoted 3 times
...
azlopaz
4 years, 11 months ago
Azure Functions DO run on schedule https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-scheduled-function
upvoted 8 times
...
...
RStover
5 years, 1 month ago
But the answer option does not include choosing the "Consumption Plan"
upvoted 2 times
...
...
Yanzhi
Highly Voted 5 years, 2 months ago
Azure Function can TimerTrigger in consumption plan (just tested in Lab) and can call external executable (exe) also (https://docs.microsoft.com/en-us/samples/azure-samples/functions-dotnet-migrating-console-apps/run-console-apps-on-azure-functions/), so answer should be Yes
upvoted 12 times
...
glam
Most Recent 4 years, 4 months ago
A. Yes
upvoted 1 times
...
vnvenkatesh
4 years, 8 months ago
Image processing might generally take more time where azure functions cannot run beyond 10 min. Beyond 10 min Azure ask us to use durable functions. So answer should be No
upvoted 5 times
...
Isti
4 years, 9 months ago
Answer: YES All other option is not valid. Exact solution described here: https://demiliani.com/2020/01/17/executing-your-exe-tasks-on-a-cloud-environment-by-using-azure-functions/
upvoted 1 times
...
LYogesh
4 years, 10 months ago
Its a "legacy Windows native executable" that means it will be difficult to rewrite. I think it should be kind of lift & shift and should be executed via Batch jobs scheduled every hour
upvoted 4 times
exams0123456
4 years, 9 months ago
I totally agree with you. This is a classic Lift & Shift especially because of Legacy Windows. Hence given answer is correct.
upvoted 3 times
...
...
denkes
4 years, 10 months ago
Requirement: You need to migrate the on premise application into Azure. Question is: Does the solution meet the goal? I would say yes. I meets the goal. You can run executables with Azure Functions. Here is a comparison overview from MS for Webjobs. Powerautomate, Logic Apps and Azure Functions.
upvoted 1 times
...
ablab
4 years, 10 months ago
One component of the application is a legacy Windows native executable that performs image processing. - The ask is not to write a code but use native windows executable. So the answer should be logic apps which will call this exe.
upvoted 3 times
Gianlucag77
4 years, 10 months ago
it is possible to call an executable from Azure Functions, too: https://stackoverflow.com/questions/45348498/run-exe-executable-file-in-azure-function
upvoted 2 times
...
tmurfet
4 years, 9 months ago
Yes you can use Azure Function, no you shouldn't in this case as you don't need to write code (writing code would be a reason to use a function). So that makes using a Logic App a better solution. Answer is no.
upvoted 3 times
...
...
[Removed]
4 years, 11 months ago
I'd say the answer should be Yes. Reasons: - You can run Azure Functions on a schedule - You can run Azure Functions with a Pay-As-You-Go consumption pricing model - You can run a binary from within an Azure Function https://docs.microsoft.com/en-us/samples/azure-samples/functions-dotnet-migrating-console-apps/run-console-apps-on-azure-functions/
upvoted 4 times
Yannor
4 years, 11 months ago
I agree with you, someone said that you can't have a CRON schedule for a funcition with the consumption model but it's not true, MS has a tutorial about it -> https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-scheduled-function This might be an outdated question. Maybe the hability to have this kind of function apps is something new
upvoted 2 times
...
...
nrex
4 years, 11 months ago
The Solution says "Create an Azure Function to run the image processing application every hour" and I would go with Yes if it would read instead "Create an Azure Function that runs every hour and which in turn runs the image processing application". The stated Solution makes me think that it suggests the usage of eternal orchestration in a Durable Function, and as such it will not meet the goal.
upvoted 2 times
...
Neetiniti
4 years, 11 months ago
Correct Answer: B As per Timer trigger for Azure Functions-"A CRON expression or a TimeSpan value. A TimeSpan can be used only for a function app that runs on an App Service Plan. The attribute's constructor takes a CRON expression or a TimeSpan. You can use TimeSpan only if the function app is running on an App Service plan. TimeSpan is not supported for Consumption or Elastic Premium Functions. https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=csharp
upvoted 1 times
HarishMahadevan
4 years, 10 months ago
100% wrong
upvoted 1 times
...
...
nealdcurz
4 years, 11 months ago
"A CRON expression or a TimeSpan value. A TimeSpan can be used only for a function app that runs on an App Service Plan. You can put the schedule expression in an app setting and set this property to the app setting name wrapped in % signs, as in this example: "%ScheduleAppSetting%" It is not possible to have a CRON or Timespan schedule for Azure functions with a consumption plan.
upvoted 1 times
...
mericov
4 years, 11 months ago
"By using Azure Functions, you can run your .exe applications in the cloud and only pay for the resources they consume when the workload is running (maybe few seconds, first million executions for month are free), without creating and maintaining environments (like Azure VMs) and (most important) without changing nothing on your .exe code. And you can do that in few minutes just with drag & drop. Let’s see how to do that." https://demiliani.com/2020/01/17/executing-your-exe-tasks-on-a-cloud-environment-by-using-azure-functions/
upvoted 4 times
...
dev2dev
4 years, 12 months ago
Why is everyone missin gthis key point of requirement "One component of the application is a legacy Windows native executable that performs image processing" How can you run this exe on a logic apps or functiosn app?
upvoted 4 times
...
Yatajga
5 years ago
The provided answer is correct. Please see: https://github.com/Azure/azure-functions-host/wiki/Investigating-and-reporting-issues-with-timer-triggered-functions-not-firing
upvoted 1 times
...
DeveshSolanki
5 years ago
Answer is Yes
upvoted 1 times
...
P0d
5 years ago
Azure Function has Consumption Plan. and Webapp uses App service plan. So Logic app is the most suitable in this question
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...