Can anyone please explain about the timing mentioned in lockAtLeastFor = "PT1M45S", lockAtMostFor = "PT2M" what is PT here

Kim*_*Kim 3 java scheduler scheduled-tasks spring-boot shedlock

Can any one please explain about timing defined in lockAtLeastFor and lockAtMostFor. what is PT1M45S and what other parameters it can accept.

  @Scheduled(cron = "0 0/2 * * * *")
  @SchedulerLock(name = "TaskScheduler_scheduledTask", lockAtLeastFor = "PT1M45S", lockAtMostFor = "PT2M")
  public void performJob()
  {
     System.out.println("executed");
  }
Run Code Online (Sandbox Code Playgroud)

Mar*_*eel 7

ISO-8601 持续时间格式。该P代表期和是(可选),接着是持续时间在年(Y)月(M),周(W)和天(D)。所述T表示时间,并且随后的一个或多个小时(H),分(M)和(分数)秒(S)。

另请参阅 的 javadoc Duration.parse。Java 支持的持续时间格式不支持Y,MWISO-8601 中指定的,而是使用简化的格式,如PnDTnHnMn.nS.