title: How to change periodic work request period without it running immediately using WorkManager?
body: <pre><code>val request = PeriodicWorkRequestBuilder&lt;FooWorker&gt;(1, TimeUnit.DAYS).build()
  WorkManager.getInstance().enqueueUniquePeriodicWork(
      "FOO",
      ExistingPeriodicWorkPolicy.REPLACE,
      request
  )
  </code></pre>
  
  <p>The code above is ran in <code>onCreate</code> of <code>Application</code> to ensure the request is enqueued. However, this will cause a problem where the <code>FooWorker</code> will run every time user start the application because <code>ExistingPeriodicWorkPolicy.REPLACE</code> cancel previous work and enqueue new work which cause it run immediately.</p>
  
  <p>If we change to <code>ExistingPeriodicWorkPolicy.KEEP</code>, we will not able to replace the work even the period or the worker is changed.</p>
  
  <p>Is there a way to replace the request after the current one is running?</p>
  
  <p>For example, origin request run a 1 time per day and the new request is 1 time per hour. After the next origin request is ran, then replace it with new request.</p>