In this hands-on lab, we use the Azure Portal to create and run a timer-triggered Azure function.
Successfully complete this lab by achieving the following learning objectives:
- Log In to the Azure Portal
Log in to the Azure Portal using the username and password supplied by the lab.
- Open a browser.
- Nevigate to the provided Azure Portal URL.
- Use the supplied username and password to authenticate.
- Go to the Overview of the Provided Function Application Service
Starting in the Azure dashboard, perform the following tasks:
- Open the navigation menu in the upper-left of the Portal.
- Click on All resources.
Wait for all the resources to appear.
In the list, click on the app service that has a name starting with fa-. This will open the overview page of the function app service.
- Create and Run the Timer-Triggered Function
On the function app overview page, click Functions in the function apps navigation tree on the left of the page.
Now click the + New function link that appears a top of the empty list of functions.
In the list of triggers that appears, click Timer trigger.
In the panel that opens, name the function "MyTimerTrigger" without the quotes.
Leave the schedule as 0 /5 *.
Click the Create button.
Wait for the function code to open in the browser.
Open the Logs panel to verify the function has already run.
If you want, wait five minutes to see it run again. Afterwards, continue to the next task.
- Change the Trigger Execution to Every Five Seconds
Click View files on the right side of the browser window.
In the panel that opens, click the
When the JSON for that file opens in the editor, change the following line:
"schedule": "0 */5 * * * *",
"schedule": "0/5 * * * * *",
Press the Save button above the code, and then the Run button.
Go back to the Logs panel. After a few moments, the function should run every five seconds.