Reputation: 8576
I've got a SharePoint timer job that takes a document library and puts the documents, converts them to PDF and puts them into a SQL server every night. Problem is, the timer job doesn't seem to work when it's called on the schedule. If I install it and then using a little console app I wrote, call execute on the job it works properly. When it runs on schedule it doesn't.
The reasons I know the job is running:
The reasons I know something is wrong:
Now I was thinking it's something weird to do with permissions when running under owstimer opposed to a console app. But the fact is, first thing it does is log to the windows event log and this isn't happening but in a timer job that only does this, it does work. And the truncate code is being hit which is after the event logging which doesn't seem to happen.
Upvotes: 1
Views: 3042
Reputation: 65361
When you run the job via the console app, it is running in the security context of your user.
When the job is run via the timer it is running in the security context of the user running that process.
Check which user is running the timer job, check the rights of that user. There should be an error in the event log or the sharepoint log files.
Upvotes: 1