Is there a way to know if a recurring job has been launched manually?

Hello,

My application registers some recurring jobs at startup.
Theses jobs can be

  • normally executed, at the defined frequency
  • or be force to be executed, if someone of my support team used the “Trigger now” action of the “Recurring jobs” page of HangFire Dashboard.

When the job is launched : is there a way to know if it’s a normal execution (at frequency) or is a special execution (launched by using the HangFire DashBoard) ?

Nope, there’s no difference between scheduled and manual launch.

@VyTre Yes, there is.


as you can see, even the Dashboard differentiates how the jobs was started.
The one that states Triggered using recurring job manager is a manual execution.

This information is stored on the Reason field of the State table