1

I have a SharePoint list that contains a list of all of our company domains and their expiry date. I've been asked to have this list whois each domain periodically and update the expiry date within the list.

I know I can do this with a console application set to be scheduled on the server but I'm sure there is a better / best practice approach to these kinds of problems.

With that in mind - what is considered the best practice for having a SharePoint list update a field for each item at a certain time each evening?

3 Answers 3

5

If you can whip up a console app and schedule it and it does the job - then great. I probably would rely on PowerShell. I prefer being able to monitor and alter scripts if needed without having to recompile or open up VS to make the edit. When working with data I've also used SSIS packages on SQL server.

If you are running SharePoint locally you have an additional option of creating timer jobs. The O365/hosted method is to use local console apps or create a web job in Azure (which also works for local installation, if they externally accessible).

If your team is familiar with .NET but not the way PowerShell works, then go with the console app. If you are the only developer, but you have admins that know how to script, you may want to go with PowerShell so it can be maintained / fixed if you are not around. I would not say there is one "best" way in general, it is really what is "best" for you and your organization.

1
  • Powershell does seem the best way since it can be delpoyed to o365 later on instead of relying on a console application on a local server. Appreciate the insight, thank-you.
    – Michael A
    Commented Jun 30, 2015 at 4:19
1

You have two options:

  1. Create a timer job. Is is similar to console application, that is run on periodic basis and is managed by SharePoint. Here is a tutorial how to create one. Cons: you will have to implement custom logging if you need one; it is not friendly to start it manually, etc. From architecture perspective: timer jobs are global artifact on whole farm and it is two "big" for such a small scenario.
  2. Create a Workflow. You can create a workflow that run on each of the items, check for updates using web services and go to sleep for 24 hours. If you will use SP2013 infrastructure workflows, they are quite reliable and you can easily log to SharePoint history list, manage it using UI. You have also create it using Visual Studio or SharePoint Designer. You have some built-in activities like "HTTP send" - for making HTTP requests, "Pause for Duration" - for waiting till next request and "Update field value".
0

You can create a Console App and trigger it using a scheduler or you can go for s dedicated windows service.

Are you using Server Object Model or Clinet Object Model . For client Object Model I can tell you That you should not go and hit the list again and again because I/O operations are most costly in SharePoint .

You should minimize the use of clientcontext.executequery which slows down our operation.

Here is a list of procedures you can follow .You can go through this link: http://expert-sharepoint.blogspot.in/2015/10/best-practices-in-sharepoint-client.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.