title: How to give notification after Hangfire is done
body: <p>Hi I have created a background job using <code>hangfire</code>in MVC 5. I send a notification that the background job has started but I don't know how to send a notification when the background job is Finished because my ActionResults method has returned.</p>
  
  <p>The Controller</p>
  
  <pre><code>public ActionResult RunMedia(int ID)
  {
      BackgroundJob.Enqueue&lt;CrawlerSearchRequestModel&gt;(x =&gt; x.StoreMedia(ID,"NaturalPerson"));
          obj
         {
           success: true
         };
  
  return JSON(obj, JsonRequestBehavior.AllowGet)
  }
  </code></pre>
  
  <p>The Ajax Call and Javascript notification</p>
  
  <pre><code>$(document).ready(function () {
      $(document).on("click", "#submitButton", function () {
          debugger;
          var userId = $(this).attr('userid')
          $.ajax({
              type: 'POST',
              url: "../LemonCreditAuth/NaturalPerson/RunMedia",
              data: {
                  ID: userId
              },
              success: function (data) {
                  swal("Adverse Media!", "Adverse Media has started. After a 20 seconds please check the media case for updates", "success");
              },
              error: function (data, error) {
                  swal("Adverse Media!", "Error ocurred while trying to run adverse media", "warning");
              }
          });
      });
  </code></pre>
  
  <p>Thanks</p>