I think this post over on SharePointMag may be what you are looking for.
Summary of Article
This looping workflow has one choice to make among three options each time iterates:
Is the task complete? If yes, quit. Yeah, we’re done!
Is this the first time I’m sending a reminder? If yes, send a
reminder and pause one day. Set a flag to indicate that ...
Absolutely, I have done this myself very recently.
You can create an Application Page that sits in the ADMIN directory in the SharePoint Root Folder. You need to add a mapped folder in Visual Studio to do this.
You can then create a Custom Action which will add a link to your application page, within any area and section within Central Administration that ...
I think one of the biggest advantages is the granulair deployment methods that you can use.
You can deploy in one package a whole application
you can determine on what kind of servers timerjobs can run
you can administer and schedule those timerjobs via the central admin/powershell
you can make use of the sharepoint logging methods (diagnostic logging)
Have a constructor on your job which takes in a SPWeb or string url, and then store the web url and list url and whatever other properties you want as a persisted property on the job.
I recommend creating a web-scoped feature to install the timer job, and create it with a name that has the web ID tacked on (for uniqueness sake in case you want the job on ...
If it's anything like 2007, the membership aspect of My Sites is worthless. In 2007, it required that you explicitly be entered into the Members group in a site/site collection. Anything higher (like owners or designers) you didn't show up. Anything lower (like Visitors) you did not show up. If you were given direct permissions you did not show up.
Your issue is related to access to Configuration Database. Please follow the link for details - http://blog.falchionconsulting.com/index.php/2009/07/custom-sharepoint-2007-site-collection-creation-page/. It describes the same issues with creation of site collection and possible solutions and also touches Timer Job.
To debug timer job you need to attach to SharePoint Timer process (after each code deployment you also need restart this service to make sure that it picks up your recent code updates, you can restart it using command prompt - net stop SPTimerV4 and net start SPTimerV4)
About sending mail - make sure that your mail server configured and working (write a ...
I like Arsalan's answer, however MS is pushing people to avoid server side development, which includes Timer Jobs. As timer jobs run on the SharePoint server, a poorly written timer job can have a negative impact on the farm. Also, if a customer ever moves to Office 365, any custom timer jobs will have to be re-written.
An app run by the windows task ...
The timer job is run by SharePoint Timer Service (OWSTimer.exe). So you need to restart the service (so that the new dll is referenced) from the Services control panel.
To open Services, Start>Control Panel>Administrative Tools>Services. Right-click the SharePoint Timer Service and click Restart.
Here are few more differences between Timer Job and Windows Task schedulers:
Timer jobs require downtime to deploy.
Control via Central Admin.
Schedule of Timer Job will be backed up and restore in your normal process of SharePoint backup and restore.
Can be deployed using standard WSP solution.
Custom Timer Jobs provides the power to specify ...
The actual point is: there's no need at all to use SPSecurity.RunWithElevatedPrivileges in a job.
A job runs in OWSTIMER.exe, which uses the "SPFarm" account. "SPFarm" account has all privileges against all content DBs; it's seen as "system account" everywhere. So there's really no need to elevate its privileges at all.
However, as a side note, code ...
Your scope of timer job is already at Web Application.
So what you have to do is, just make sure the feature should not be auto activated. You just disable the setting Automatically Activate.
So, just activate the feature on the Web Application you need to use.
A job does not have a thing such as a "scope". They have a lock (Job, Database and None) but that's something else.
So you're actually talking about the scope of the feature that deploys (through a feature event receiver).
Several things have to be noted:
Web application-scoped features are (by default) automatically activated when the WSP is deployed. ...
Just to accomplish what John said, you can create a schedules task for the following PowerShell script:
$UserProfileService= Get-SPServiceApplication 42gg4bda-1hd0-4df6-bfgg-54gd4df33ff
P.S. Full Import can be intensive though so be very careful with the schedule.
This article can probably help you, briefly, you will need to set ContentService.RemoteAdministratorAccessDenied setting to false.
PowerShell code (copy-pasted from the article):
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$contentService.RemoteAdministratorAccessDenied = $false
5 minutes is a good default setting. Setting it less than that as suggested can cause additional overhead. Where I've seen it be really bad, is when it's set to one minute, and yet it takes longer than a minute to finish all of the timer jobs. I've seen cases where the timer job has hung. Really depends on the environment, number of users, and if you're ...
Enabling document id on a hierarchy of sites is not as straight forward as one should think.
I have digged pretty deep into this one more than one occasion (might collect it to a blog post later), and it all boils down to the SPWorkItems that the timer job uses to enable document id on the sites/subsites and the timer job that sets the document id on each ...
Each SharePoint Timer Job has a property bag (SPPersistedObject) that it can read from. When I write timer jobs that need to have configuration that is where I store it. Accessing this configuration information from your timer job is as easy as having code like the following in your Execute() method. In the example below, I put all of my configuration as ...
In order to execute RunNow method Farm Administrator rights are required. When you use RunWithElevatedPrivileges method, the code runs in the context of application pool account, which usually does not have farm admin rights (and it should not have it according to best practices)
So the solution is to run the code in context of some user that does have farm ...
Number of items in a list as per your description not a big because SharePoint can store millions of items in a List. Only problem is the List view Threshold, Number items are returns in a view cause the issue if it breach MSFT best practice limit( 5000 items).
Their are ways to deal with large with i.e using the index column, metadata columns etc
Here is ...
You cannot configure a timer job like that. The best approach you can go for is:
Configure the timer job to use an hourly schedule (run every hour)
At the start of timer job check if DateTime.Now.Hour is divisible by 4.
If not, exit the job, if yes - continue.
To set up a timer job to use hourly schedule, use the following code:
string strJobTitle = "...
Yes, The web application will work fine. because it relies on IIS!
The SharePoint Timer service is a windows service that runs other
services according to schedules specified in timer jobs. If it stops,
all services and timer jobs controlled by the SharePoint timer service
will be stopped, use Get-SPTimerJob to return timer jobs
I could reproduce the behavior.. Apart from the things you have already discovered, check following to see if that fix your problem.
Under Central Administration, UPS --> People --> Manage Policies, Check under "Membership" category for the item "SharePoint Site" and make sure it is ENABLED. If it is disabled, you would see nothing under Membership in your ...
You need to have SharePoint installed for you to develop for it. No getting around that. You could just write pure CAML and use a standard C# assembly project for the DLLs, and use something like WSPBuilder to compile it into a deployable WSP file, though you would be unable to test your development as you went along, and it would take you a horrendously ...
Ok, first are both checkboxes at the bottom marked ("Show processes from all users" and "Show processes in all sessions")? If so, maybe you changed the type of code shown under the "Attach to:" field. I would dig through these three settings.
If you still can't find the process after that, try an old fashioned reboot.
One thing to remember when you are using site-scoped or site collection–scoped Features to install the timer jobs: The account that does the scheduling must have write permissions to the configuration database of the server farm. Usually, the identity of the application pool that is hosting the SharePoint site does not have permissions on the configuration ...
Benefits of Sharepoint Timer jobs over Windows Task Scheduler are :
Single point of failure : Windows Task Scheduler need to be configured on all the web servers. If you configure to run the job on 1 server only, and this server crashes, job will not work at all.
Status Reporting : Windows Task Scheduler doesn't have any reporting on when was the last time ...