views:

246

answers:

1

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 central admin when I last tried this. So either something is broken and it's not updating the status, or it doesn't update the status by design and I'm mistaken about it doing so last time.

A: 

I've discovered that OWSTIMER.exe doesn't end up doing the execution. I wrote a console app which did the call to SPJobDefinition.Execute and it turns out that Execute doesn't schedule it to run there and then, but actually loads up the dll for the job and runs it in process. I would imagine that a side effect of this is that it doesn't run under schedule and so Central Admin doesn't show that it ran.

Dan Revell