How to show Failed status in a Sharepoint timer job

I want my timer job to display a failure status under certain conditions. Should I just throw an exception or what?

+1
source share
1 answer

Hasan,

If an exception is thrown from the code, it really will show an unsuccessful status. If you want to explicitly “fail” your run with an instance of the timer job, you can and should throw an exception. This can be done in conjunction with setting the flag SPJobDefinition.Retryvalue to TRUE if you feel that another run can bypass your “problem state”.

, (, ULS - ), , , . , - ( / ).

, !

+1

All Articles