Returning timer job status from custom timer job

2019-08-02 00:42发布

问题:

There is a timer job status page in Central Admin
/_admin/ServiceRunningJobs.aspx

How can I properly return the status for my custom timer job ?

The Execute() method of timer job returns void.

回答1:

It either fails (Exception) or succeeds (Method completes)



回答2:

SPJobDefinition.UpdateProgress