Skip to content

Format Parsing

R2/2015-06-04T19:25:16.828696-07:00/P1DT10S

The string above is divided into three parts by "/":

Repeat Count/Start Time/Execution Interval

Repeat Count

  • R - Repeat forever
  • R1 - Repeat once
  • R231 - Repeat 231 times

Start Time

The time when the task runs for the first time. If the start date and time has passed, Kala will return an error.

"T" is used to separate date and time, and "-07:00" following the time indicates the Western 7th time zone. Note that "-" is a hyphen, not a minus sign.

The default time zone is UTC, which can be represented by "Z" or omitted.

For China, use "+08:00" to represent the Eastern 8th time zone. The string above represents June 4, 2015, 19:25:16.828696, Western 7th time zone.

Execution Interval

The execution interval starts with "P", and like the above, uses "T" to separate date and time, such as P1Y2M10DT2H30M15S

  • P - Start marker
  • 1Y - One year
  • 2M - Two months
  • 10D - Ten days
  • T - Separator between time and date
  • 2H - Two hours
  • 30M - Thirty minutes
  • 15S - Fifteen seconds

Examples, note that "T" cannot be omitted even if there are no years, months, or days

  • P1DT1M - Execute once every day and one minute
  • P1W - Execute once every week
  • PT1H - Execute once every hour
  • PT10S - Execute once every ten seconds