I am having a hard time piecing together the documentation on Azure webjobs, so that I can deploy a scheduled WebJob to my WebApp without using Visual Studio. In my case the code is on GitHub and I want the deployment to be fully inititated by the webhook to Azure.
The documentation mentions that I can drop .exe into: \App_Data\jobs\continuous\webjob1 of my WebApp. I have created a post-build script that does that, which works fine. It's discovered and displayed in the Azure manager. But I can't make i scheduled.
Take a look at the following post to easily add a schedule to your WebJob.
Note that the path you are deploying the WebJob to
\App_Data\jobs\continuous\webjob1
is actually for a continuous WebJob, you need a triggered WebJob that would go in the triggered directory\App_Data\jobs\triggered\webjob1
.Then you just add the settings.job file with the schedule property in the form of a cron expression (with 6 fields).
For example -
{"schedule": "* 0 * * * *"}
(once an hour at 1:00, 2:00, 3:00, ...).Another option is to use Azure Scheduler service which you can configure from the current Azure Portal.