Hot answers tagged timer-jobs
9
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 ...
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
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
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 ...
7
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.
6
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 ...
6
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 ...
6
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
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 ...
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
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
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?
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
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()
...
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
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
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.
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?
4
SharePoint has a timer job that can do task periodically: http://www.techtimepiece.com/2011/09/working-with-custom-timer-job.html
There is already some ready solutions that allow you to specify reminders for lists. Reminder is different than an alert in the sense that it doesn't need to have item altered to fire off. Reminder queries list time to time and ...
3
You can do it from a scheduled task, we do that for certain administrative tasks. Do you really need this to happen as a Timer Job from SharePoint or wouldn't a Scheduled Task do just as well? I don't see the need for a Timer Job since you can set the same sort of schedule as a Scheduled Task.
3
There are a couple of ways of calling PowerShell from within code (e.g. within a timer job):
Run PowerShell Script using automation interface.
Run PowerShell using command line.
You have to give some thought to where the timer job is running, if you have a farm with multiple servers. The timer job normally runs as the farm account. You will also need to ...
3
You can use
System.Diagnostics.Debugger.Launch();
to attach a debugger (Visual Studio) instead of attaching the timer job in VS.
Also i tend to use DebugView alot to just write out asserts or messages like
System.Diagnostics.WriteLine("sometext","MYCATEGORY");
Another tip for testing is to encapsulate the logic in its own class. Then you can test ...
3
Are you referring to out of the box or custom timer jobs?
You can use the "Timer Job Status" page within Central Administration to view scheduled and running jobs - the "Server" column shows you where the job is being run.
I am not aware of a means of directly changing where a timer job will run. However, it's worth noting that the location is likely tied ...
3
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 ...
3
Bas nailed it, but basically, if your farm is any more complex than a single server (which it should be unless it's a development environment), then custom timer jobs are far easier to maintain across your farm.
Also, if a server drops off the network, it will be synchronised and everything will come back online and up to date when it rejoins. You cannot ...
3
Make sure you haven't set DeploymentServerType="ApplicationServer" in your Solution Manifest file. You can also go to the WFE and see if the job-related assembly(s) have been GAC'd.
Can you provide the line of code you're using when you create an instance of the job...i.e:
MyTimerJob job = new MyTimerJob("jobname", webApp, null, SPJobLockType.None);
3
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.
Only top voted, non community-wiki answers of a minimum length are eligible
