This sample shows how to perform operations on-demand with Azure WebJobs as continuously running operation, which will handle incoming requests from Azure Storage Queue. This can be really easily achieved with only few lines of code and is extremely powerful technique for providing asynchronous operations started by end user. Comparing this to classic server side timer jobs, this equals to the model where you use SPOneTimeSchedule class for your timer job scheduling based on end user input.
Typical use cases for long lasting asynchronous operations would be for example following.
- Complex configurations installed from the app to the given host web
- Complex app Installed operations due 30 sec time out
- Self service operations for the end users, like site collection provisioning for cloud or for on-premises with service bus usage
- Route entries or information from Office 365 to on-premises systems
- Start perform complex usage calculations or other long lasting business logic cross tenant
Actual code and additional details can be found from following address - https://github.com/OfficeDev/PnP/tree/dev/Samples/Core.QueueWebJobUsage