Introduction
In SharePoint 2010/2013 On-premise, we have Timer Jobs, which perform repetitive, scheduled tasks. For example, you may need a timer job to fetch Sharepoint list items and send them as reports on a daily basis. This timer job can be created as a farm solution and can be deployed in SharePoint 2010/2013 On-premise Server, whereas in SharePoint Online, you are not allowed to deploy the farm solutions. To overcome this, you can create Azure WebJobs, which act as scheduled timer jobs for SharePoint Online. In my previous article,
How to Create Azure WebJob For SharePoint 2013 Online
You have learned how to create a simple Azure WebJob for SharePoint 2013 Online and publish it directly from Visual Studio.
In this article, you will learn how to create a scheduled WebJob for SharePoint 2013 Online, using a classic Azure portal. I have an existing Website in the Azure portal, in which I am going to schedule a Webjob.
Prerequisites
- Visual Studio 2013 or the latest versions.
- Office 365 Site. If you don’t have an Office 365 site, please try the trial version.
- Access to Azure portal. If you don’t have an Azure account, please try the trial version.
- How to Create Azure WebJob For SharePoint 2013 Online.
Create the Zip file for your WebJob
- In Solution Explorer, right-click the project and click “Open Folder in File Explorer”.
- Copy all the output files from bin/Debug or bin/Release folder and create the zip file.
Create a Scheduled WebJob
- Navigate to the classic Azure Portal.
- In the left navigation, click Web Apps. Subsequently, click the existing Azure Website.
- Click WEBJOBS.
- Click Add.
- Enter your Name, upload the zip file that you have created, and select Run on a schedule option from the How to Run drop down. Select Scheduler Region.
- Define a schedule, based on your requirements, as shown below. Click the Complete button.
- A scheduled WebJob was added successfully, as shown below.
- Click Logs for the newly added WebJob and you are able to see the WebJob run details.
Summary
Thus, in this article, you have seen how to create a scheduled WebJob for SharePoint 2013 Online, using the classic Azure portal.