I am looking for a way to trigger or run an executable daily at a specific time on azure virtual machine through function app. Is there a way azure function app can talk to virtual machine?
Going through samples on microsoft learn site I didnt find any way to do this. I can try adding it to task scheduler but it will be difficult to manage in production and view logs or start/stop service as team has limited access in production.
You can use azure PowerShell timer trigger function to run executables at a given time.
Then create the azure function. Open Function App and then click on Functions and click on Create:
Then click on Timer Trigger and then set the time interval you want as below:
Then open the created function:
PowerShell Script to run on VM. As an Alternative you can use Automations and Logic apps as @Skin Commented.