If you have not added a function application in the Azure App Service Portal, you can refer to the article "Dynamics 365 triggers the call to Azure Function" to add and configure it. You can also refer to this article for the code publishing steps.
Create an Azure Function project in VS
Add Azure Functions to the project
Select Timer Trigger, and the Schedule on the right is the execution cycle of the scheduled task, which is executed every 5 minutes by default. Cron expressions are used in this place. For specific syntax or generation, please refer to Online verification and generation of Cron expressions
The following is an empty example after adding. I set it to run every 10 minutes, publish it to Azure, and monitor the running records in the log (for publishing and monitoring, you can also refer to the article "Dynamics 365 Triggers Calling Azure Function").
In the Azure function application management center, you can see the corresponding released new functions in the function navigation.
Enter the monitoring and view the completed log
Log details
You can also manually trigger the corresponding function, as shown below, click "Test/Run"
If you need to call the timer trigger for VS debugging, after starting to run, it will appear as shown in the figure below, directly add a breakpoint in the code, and wait for the trigger period set by the timer to enter the breakpoint.