title: Can Hangfire Work as A Simple Method Timer?
body: <p>I have a .NET Core Web API application. The app contains models for db access and a way to send emails to users. My end goal is to call a method nightly (to email users that their registration expired and to mark it expired in the database).</p>
  
  <p>So, in short, I can build an endpoint and call it manually every night. Or build a windows service to call the endpoint. Or build a windows service to do the work. But I want to keep the logic in one application.</p>
  
  <p>My ideal solution would be to have a timer running inside my app and calling a method in a service every 24 hours. Of course, that's not possible, so I am looking at Hangfire. The <a href="http://docs.hangfire.io/en/latest/" rel="nofollow noreferrer">official documentation</a> seems to indicate that there is a lot of overhead. </p>
  
  <blockquote>
    <p>Hangfire keeps background jobs and other information that relates to the processing inside a persistent storage. Persistence helps background jobs to survive on application restarts, server reboots, etc.</p>
  </blockquote>
  
  <p>Do I need this if I just want to call a method?</p>
  
  <blockquote>
    <p>Background jobs are processed by Hangfire Server. It is implemented as a set of dedicated (not thread pool’s) background threads that fetch jobs from a storage and process them. Server is also responsible to keep the storage clean and remove old data automatically.</p>
  </blockquote>
  
  <p>Do I even need jobs?</p>
  
  <p>Is there a way to JUST call a method without all this overhead with Hangfire?</p>
  
  <p>tl;dr: Are there options to opt out of the dashboard, database connectivity, etc and just have Hangfire work as a timer?</p>