title: Hangfire in ASP.Net Core : simple recurring job does not refresh its dynamic content
body: <p>I am trying to implement cron task on a web application in ASP.Net Core 1.1.</p>
  
  <p>I decided to choose the <a href="https://www.hangfire.io/" rel="nofollow noreferrer">Hangfire</a> library.</p>
  
  <p>In order to check if my installation and configuration were working fine, I just wrote a very simple recurring job, aimed to print the current DateTime on the console output :</p>
  
  <pre><code>RecurringJob.AddOrUpdate(() =&gt; Console.WriteLine($"{DateTime.Now}"), Cron.Minutely);
  </code></pre>
  
  <p>The weird thing is that every minute, it prints the <strong>same message</strong>, corresponding to the date and time of the first time the message was printed, and not updating the <code>DateTime.Now</code> part.</p>
  
  <p>If I access the /Hangfire dashboard, and look at the job details, it appears translated as static datetime output, as such :</p>
  
  <pre><code>Console.WriteLine("15/09/2017 15:27:21");
  </code></pre>
  
  <p>So the job seems to be kind of 'compiled' when enqueued and this is obviously not what I intended to do.</p>
  
  <p>I tried to replace this job by a job counting rows on a database table. And the problem is the same : if I add or remove rows between two occurences of the job, the row count displayed is not updated. Update only occurs if I restart the web application.</p>