You can schedule the execution of Windows application using Azure WebJobs.

Steps

  • Copy .exe and supporting files to a directory.
  • Zip up the directory.
  • Go to Azure Portal -> App Services -> UserApp01 -> WebJobs
  • Add
NameNameOfYourJob
File UploadZipped up file
TypeTriggered
ScaleSingle Instance

Triggered CRON Expression

ExpressionFrequency
0 0 * * * * Every Hour
0 30 9 * * * at 9:30 AM every day

CRON examples

Here are some examples of CRON expressions you can use for the timer trigger in Azure Functions.

ExampleWhen triggered
"0 */5 * * * *"once every five minutes
"0 0 * * * *"once at the top of every hour
"0 0 */2 * * *"once every two hours
"0 0 9-17 * * *"once every hour from 9 AM to 5 PM
"0 30 9 * * *"at 9:30 AM every day
"0 30 9 * * 1-5"at 9:30 AM every weekday
"0 30 9 * Jan Mon"at 9:30 AM every Monday in January

Note: Need to turn on “Always On” for app service. Time is the time on the server (UTC).

Indicates that your web app needs to be loaded at all times. By default, web apps are unloaded after they have been idle. It is recommended that you enable this option when you have continuous WebJobs running on the web app.

Sources:

https://docs.microsoft.com/en-us/azure/app-service/webjobs-create

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

Last modified: May 13, 2019

Author

Comments

Write a Reply or Comment