private void scheduleTask(long delayInMs) {
    currentTask = new TimerTask() {
      @Override
      public void run() {
        isRunning = false;
        task.run();
      }
    };
    logger.info("Scheduling task with delay of {} seconds", delayInMs / 1000);
    timer.schedule(currentTask, delayInMs);
  }
Schedules the task to run after the specified delay.
@param delayInMs The delay in milliseconds before the task is executed.
ambry-utils/src/main/java/com/github/ambry/utils/ExtendableTimer.java