@Override
  public long initialDelay(TimeUnit unit) {
    // no delay before the first execution;
    // after an ungracefull shutdown it might take time to notice that in-flight scheduled queries are not running anymore
    return 0;
  }
Metastore task to remove old scheduled query executions.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ScheduledQueryExecutionsMaintTask.java