2
votes

I have developed custom timer job in SharePoint 2007. Issue i get , is that timer job executes properly few times, after that it stops working and if i check the status of the job it stuck on "Initialized" mode. If i remove and add job definition it will start working again few times with "Succeeded" status, after which again the same issue.

Any ideas?

Hrayr

1
Can you post some code ? What is the schedule ?Madhur Ahuja
job execution is a big code doing some export from sharepoint. schedule is 5 minutesHrayrd
Do reset of timer job service helps?EvgK

1 Answers

0
votes

It might be that you are developing the Customized Content Deployment job for Export and Import of the Contents between different Web applications. So, it could be export is not performed properly or perhaps export failed during the job execution. There also might be dependency between different jobs.

I would recommend you to take following actions:

If you are working with Import and Export Timer jobs, then try to increase the span of Export timer job from 5mins to 10 mins. Let import run to be run in short durations for e.g. 2mins. Then start debugging the code.

For debugging: Its very important here to attach debugger with "Owstimer.exe" process in Visual studio to help debug the code of affected Timer Service. Make sure that you set breakpoints in the code. Also make sure you reset SharePoint Timer Services after you done with Timer job deployment

You can execute these in cmd:

net stop "Windows SharePoint Services Timer"

net start "Windows SharePoint Services Timer"

Good luck