title: Android run Kotlin Coroutine every x min
body: <p>I am using code below to execute certain task every 5 minutes.</p>
  
  <p>Do coroutines have anything like this built into them?</p>
  
  <p>Is there any better way of doing this?</p>
  
  <pre><code>private val interval = 1000*60*5L
  private val handler:Handler = Handler()
  
  val mHandlerTask = object : Runnable {
      override fun run() {
          val id: String = getId(this@HomeActivity)
          settingsViewModel.Settings(id)
          handler.postDelayed(this, interval)
      }
  }
  </code></pre>
  
  <p>Thanks </p>