title: Android WorkManager api for running daily task in Background
body: <p>I need to call one API daily in the background even if the app is closed. I have seen about WorkManager API. For my scenario, I tried PeriodicWorkRequest but unfortunately, it's not working as my expected result. What I did is I used this code in the Application class </p>
  
  <pre><code> PeriodicWorkRequest.Builder myWorkBuilder =
                  new PeriodicWorkRequest.Builder(MyWorker.class, 24,
                          TimeUnit.HOURS);
  
          PeriodicWorkRequest myWork = myWorkBuilder.build();
          WorkManager.getInstance().enqueue(myWork);
  </code></pre>
  
  <p>But it's running repeatedly for 11 times when the app is open for the first time after that, it's not running after 24 hrs. Please, anyone, help me to solve.</p>