Tag Info

Hot answers tagged

21

You need to restart the SharePoint timer service (Start > Run > Services.msc). The timer jobs code get cached in the timer.


10

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 ...


9

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 ...


9

Just try to run this from the run dialogue net stop sptimerv4 net start sptimerv4 this should do the trick.


8

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) ...


8

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.


8

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 ...


7

SPJobDefinition has two constructors One for web applications: http://msdn.microsoft.com/en-us/library/ms427704.aspx And one for services: http://msdn.microsoft.com/en-us/library/ms461120.aspx You can attach to the central admin service (like the Health Analysis Job) Or the Microsoft SharePoint Foundation Timer service (check ...


7

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. If ...


7

I think this post over on SharePointMag may be what you are looking for. http://sharepointmagazine.net/articles/the-dog-ate-my-task-use-sharepoint-designer-to-email-daily-task-reminders EDIT 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 ...


6

Creating a Timer Job in Windows SharePoint Service 3.0 http://msdn.microsoft.com/en-us/library/cc406686(office.12).aspx Same principles for SharePoint 2010 I'm assuming, unless anyone else can differ?


6

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 $contentService.Update() ...


6

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 ...


6

Here are few more differences between Timer Job and Windows Task schedulers: Timer Jobs 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 ...


5

Hi you should build ONE solution (WSP package) which you deploy ONCE. The package contents/timer jobs will be replicated to all your SharePoint services. You should activate it at Farm level - since its a Farm level job. And if you want it to run only on one WFE in your farm set SPJobLockType to Job.


5

My biggest issue with testing timer jobs was getting the job to start so that I could debug it. It seems like I when I reset the timer service whenever I deployed new code and when the service restarted, even though I had my job to run every minute, sometimes it would take up to an hour for it to "catch up" and get around to running my timer job. I think ...


5

You can store the site id and other values on the web application property bag. Here is an example on setting and updating the webpapplication properties SPWebApplication webApp = SPWebApplication.Lookup(new Uri(ddlTargetWebApp.SelectedValue)); //I use the site and and the key to identifying them if (webApp.Properties.ContainsKey(siteId + key)) { ...


5

Timer jobs run under the farm account. Have you checked that this account has permissions on your mail server?


5

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 $UserProfileService.StartImport($true) P.S. Full Import can be intensive though so be very careful with the schedule.


5

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 ...


5

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.


5

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 ...


5

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 ...


4

Jobs that are already running take priority, and new jobs that want to take over will fail. In order to ensure the new job to run, the old job must finish or be aborted. What does your timer job do exactly? If there are database transactions or file movement, I would say to avoid the abortion of the job if you can help it.


4

Unless specified otherwise in your connection string, your timer job will connect to the database using the credentials your Timer Service is running under, not the interactive user. So make sure the Timer Service account has the appropriate privileges.


4

AFAIK, there is no standard way to achieve this. But this can be done programmatically with no apparent troubles. In this case, I would recommend you to create a timer job, and based on settings stored in detached "configuration" list - change permissions on particular folders every night (or more often, if needed). I assume, the "configuration" list ...


4

There is no "cancel" method on SPSolution's. If you still have the solution file(s) you can just add the solution again and re-i stall it. First you should start timer job and finish the retraction, and remove solutions though...


4

It really depends on your environment and how much workflow activity you have, but I would probably not be comfortable setting it to 1 minute in any of the environments I have worked. Setting it to 1 minute could mean a lot of increased activity and additional resources needed to support these checks. If you have heavy activity and limited resources you ...


4

Not that I am aware of. I think it’s hard if not impossible for someone to come up with a product which can (efficiently) address enormous amount of possibilities with SharePoint without custom code. There is a “SharePoint Timer job Item” VS.NET extension which can download and get started with a template for your custom timer job.


4

The chosen language cannot be the reason why your job doesn't work. Regardless of language it compiles in the same MSIL. Did you check ULS for any errors related to your job? Did you check ULS settings - maybe it configured not to log some messages? Did you check job status in Central Administration?



Only top voted, non community-wiki answers of a minimum length are eligible