We'll be providing our customers with an Admin section within our web app where they'll be allowed to set various admin related settings and one of the section we'd like to provide within the admin module is a front end that will allow an admin user to add/update/delete webjobs (predefined only) and schedule them to run every x minutes within a given range i.e. working week for example.
There will only be a finite list of webjobs that we'll provide to our clients but we really don't want to hardcode the scheduling or having to set it up for them, so we really need to allow them to this via the admin module.
I don't mind using the REST API and while there seems to be a clear explanation on each of the Requests/Responses that are required from Create Job (Scheduler API), but ideally, I'd prefer using the SDK and I'll continue researching it and see if I can find something but as I said, I don't seem to be able to find an example from start to finish.
I'd appreciate if anyone could point me in the right direction and provide me the info I need trough a sample or provide me with a link or two to relevant articles.
Thanks.
WebJobs deployment is nothing more than placing the WebJob files in the right place so it's quite easy to programmatically deploy a WebJob.
Just place the files (or unzip a zip file) under
d:\home\site\wwwroot\App_Data\jobs\{webjob type}\{webjob name}
Read more about this here.
Scheduling a WebJob (a triggered/ on demand one) programmatically is also easy once you don't use Azure Scheduler but use the internal scheduling that the WebJob core provides.
It is simply another file that describes the schedule, updating the file updates the schedule.
See this question for more info or read more about the scheduling here.