timer-jobs

Workflow Auto Cleanup timer job does not run

I am testing a couple of workflows for their workflow history cleanup time intervals. The workflow History needs to be retained for a specific number of days. I have implemented the solutions recommended here My problem is that, now I need to test my code to see if the workflow history is getting cleaned up after the exact number of da...

How do you instruct a SharePoint Farm to run a Timer Job on a specific server?

We have an SP timer job that was running fine for quite a while. Recently the admins enlisted another server into the farm, and consequently SharePoint decided to start running this timer job on this other server. The problem is the server does not have all the dependencies installed (i.e., Oracle) on it and so the job is failing. I'm ju...

Scope of a timer job feature

I am writing a timer job for the first time. I am following the examples that can be obtained by googling as my reference. In many such articles, I am coming across the timer job features being activated to the Site Collection level or the Site level. I feel this is weird, since there can be only one instance of a timer job for a parti...

Server process with PHP+MySQL

I am new to web programming, and I am developing a simple appointment app with PHP + MySQL. Is there a simple way to add a background process on a timer (to send out daily appointment reminders, for example)? This could be done easily in another language, but I want it to run on shared hosting with only PHP. ...

Debugging Sharepoint timer jobs

Hi all. I am creating my first Timer Job and want to debug it. I have installed the timer job through a feature, and added it to a webapplication's JobDefinitions collection, and added a SPMinuteSchedule to run every 5 minutes (for testing purposes). Then, in Visual Studio I've tried attaching the debugger to the WebApplication's Proces...

Problem in creating Timer Job

Hi, I have created a site collection inside a web application with user A as a site collection adminstrator. I have added a link in site feature page. On click of that link I am trying to create a timer job.Below is the code executed on click of the link //Allow unsafe updates. SPContext.Current.Web.AllowUnsafeUpdates = true; //Get cu...

SPSite.Exists() returns true although the site collection doesn't exists

I'm currently working on a TimerJob which does some site collections management. When the job runs it looks into a list to retrieve the Url of a site collection then it calls SPSite.Exists() to check if the site still exists or not. To test the TimerJob I delete a site collection but left the corresponding entry in the list. Then I sta...

SharePoint Feature Activation Form

I'd like to collect some information from a user when they activate a feature on a site. Just like the WF Association form when you add a workflow to a list. My particular scenario is a feature that creates a timer job that will do a weekly export of a document library as PDFs to a special staging database. When the feature is activated...

TimerJob development, what does the EndSecond property of a SPMinuteSchedule mean

Hi, I'm currently developing on a project which uses some TimerJobs. One of the jobs should check the MySites of some special users about every 2 minutes. So I create a SPMinuteSchedule object and set the BeginSecond property to 0 and the Interval property to 2. I think the use of both properties seem to be obvious but I'm not really su...

Manually start SharePoint timer job

I'd like to invoke a timer job installed on a SharePoint server manually. What would be useful is something along the lines of an stsadm command. My scenario is, I've deployed a solution with a bunch of features to a customers server. I don't want to wait for the weekly schedule to kick a particular timer job to life. I would like to ju...

TimerJob's schedule time format is unspecified instead of beeing local time

We have a problem with the scheduling of our timer jobs. The jobs we have developed run only one time after that they delete themselves. To schedule the jobs we filter the web application's SPJobDefinitionCollection for our timer job type and look for the one with the latest schedule time via the NextOccurrence() method of the job's Sche...

SharePoint: Timerjobs Lock Type

Hi I am trying to create a timer job in WSS 3.0. My timer job would create the object of SPsite then SPWeb and then SPDocumentLibrary (or possibly picture library)using their GUIDs stored in any xml or database.After that it would take the back up of documents in the document library in some third party application and then delete thos...

SharePoint timer jobs not getting invoked.

I have a timer job which has been deployed to a server with multiple Web front ends. This timer job reads it's configuration from a Hierarchical Object Store. This timer job is scheduled to run daily on the server. But the problem is that this timer job is not getting invoked daily. I have implemented event logging in the timer job'...

Elevated privileges in timer jobs

Can we use SPSecurity.RunWithElevatedPrivileges in SharePoint timer jobs? Under whose identity will the timer job run under elevated privilegs? Any gotcha's and must know facts regarding this will also be appreciated. ...

Problem in executing Cron Jobs

i have done a bidding site in Cake PHP.The main problem I am facing is I need to run CRON JOBS on the server.But I dont' know why it is bugging me.I have craeted a controller called 'deamons' and there 4 different actions of it,which I want to run continuously on the server every minute,so that we can run the Autobidder set by each user ...

How to show Failed status in Sharepoint Timer Job

I want my timer job to display failed status on certain condition. Should I just throw an exception or what? ...

Sharepoint Timer Jobs

Is there a way to adjust the schedule of a Sharepoint timer job? The only options I'm seeing in central admin is the option to enable/disable the job and a way to change the job name. Are there some kind of permissions that I need to actually start a job or edit any meaningful data? I inherited a couple of projects when someone left t...

How to execute share point custom timer job on specific farm server ?

we have two server A and B , when i install job and activate its feature on Server A sharepoint decides to run its instance on server B i dont know why How can i restrict it to run on server A ? . ...

SPJobDefinition.Execute running but not showing it ran in Central Admin

I'm using SPJobDefinition.Execute to explicitly force a timer job to run for a bit of testing. The job runs but the time it last ran hasn't changed in either 'Timer job status' or 'Timer job definitions'. As this hasn't run before, forcing it doesn't even appear in 'Timer job status'. I recall that it did update the last run time inside ...

Sharepoint Timer Job and log4net

Hi mates I'm developing a custom SharePoint solution which consist of a feature and a timer job (which is created by the feature in FeatureActivated). In my solution I want to use log4net for logging (I know about ULS). Everything is fine with log4net in the feature itself (just placed log4net.config near web.config and all is fine), ...