Question

I have a couple of sharepoint online lists which have a custom column named "Project Due Date" of type Date-time. Now i want to run a scheduled job on daily basis (12:00 am) which will check if the "Project Due Date" is within next week, and send an email to a group of users inside a SharePoint group accordingly. then after sending the email, to update a checkbox inside the list item indicating that an email has been sent (to avoid duplicate emails on next day).

if i am inside a SP-Onpremises environment, i will do this by creating a console application + schedule its execution using windows tasks scheduler.

but inside sharepoint online, what are the best appraoch to achieve this? Thanks

Was it helpful?

Solution

You should run your job in any cloud-based service, which supports scheduled runs. It might be AWS (Amazon Web Services) or Azure. Azure is a better choice because it's .net based, Microsoft backed, has a lot of convenient SDKs and this approach is proven by many SharePoint developers\companies.

In Azure you have two options: go with Azure Function or with Azure web jobs.
Azure jobs have a higher cost in comparison to Azure Functions.

Azure Functions have a free tier, which gives you approximately 100hours with 1GB memory or 200 hours with 512MB of memory per month for a function running 1 sec or 3.3 hours with 512MB of memory per month for a function running 1 minute. An Azure function can't run more than 10 minutes, that's a drawback. If there is a chance, that your timer jobs run more than 10min, then go ahead with Jobs.

For Azure Jobs you have to select always on mode, which will cost at Basic level approx. 50$ per month.
In general, if money doesn't matter I suggest using jobs for such tasks. Why? Because Functions are more for serverless approach, with different triggers and dynamic flows. Also, Web Jobs sdk a lot more stable and friendly. Azure Functions are still changing some things, which might be confusing at start.

Must read articles - PnP remote timer job framework

One another approach through using your own on-premises infrastructure, which has internet access. However I believe it's even more difficult and costly to implement than cloud-based solution.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top