# Every set time

특정 시간마다 반복적으로 작동하는 로직이 필요할 때 "크론 표현식"을 사용해요.&#x20;

* **If When** : Every set time

<div align="left"><figure><img src="/files/OJHmJeStRDbi4DKdaYBc" alt="" width="506"><figcaption></figcaption></figure></div>

* 오마이앱에서 크론 표현식은 아래와 같은 필드로 구성 돼요.&#x20;
* 분(\*) 시(\*) 일(\*) 요일(\*) 월(\*)&#x20;
* 입력 예시) 30분 마다 실행한다 : 30\*\*\*\*

<div align="left"><figure><img src="/files/Ixenzv1gLfO7QFiKuIyY" alt="" width="473"><figcaption></figcaption></figure></div>

* **각 필드에는 허용되는 값 범위와 특수 문자가 있어요.**&#x20;

  * 초(Seconds) - 초 단위는 현재 지원하지 않고, 최소 1분 단위로 지원하고 있어요.&#x20;
    * 값 범위: 0 \~ 59
    * 허용 특수 문자: \*,-/
  * 분(Minutes)
    * 값 범위: 0 \~ 59
    * 허용 특수 문자: \*,-/
  * 시(Hours)
    * 값 범위: 0 \~ 59
    * 허용 특수 문자: \*,-/
  * 일(Day)
    * 값 범위: 1 \~ 31
    * 허용 특수 문자: \*, - ? L W
  * 요일(Week)
    * 값 범위: 0 \~ 6 또는 SUN \~ SAT
    * 허용 특수 문자: \*,-? L #
  * 월(Month)
    * 값 범위: 1 \~ 12 또는 JAN \~ DEC
    * 허용 특수 문자: \*,-/

* **특수 문자**
  * \* : 모든 값을 의미해요.&#x20;
    * 매시, 매일, 매주 처럼 사용해요.&#x20;
  * ? : 특정한 값이 없음을 뜻해요.
  * \- : 범위를 뜻해요.
    * 예) 월요일에서 수요일까지는 MON-WED로 표현해요.
  * , : 특별한 값일 때만 동작해요.&#x20;
    * 예) 월, 수, 금은 MON, WED, FRI로 표현해요.&#x20;
  * / : 시작 시간 / 단위예요.&#x20;
    * 예) 0분 부터 매분 5분마다는 0/5로 표현해요.&#x20;
  * L : 지정할 수 있는 마지막을 의미해요.&#x20;
    * 예) 일에서 사용하면 마지막 일, 요일에서 사용하면 마지막 요일(토요일)을 의미해요.&#x20;
  * W : 가장 가까운 평일의 의미해요.&#x20;
    * 예) 15W는 15일에서 가장 가까운 평일 (월 \~ 금)을 찾아요.&#x20;
  * \# : N번째 특정 요일을 설정할 때 사용해요.&#x20;
    * 예) 3#2는 2번째 수요일을 의미해요.&#x20;

<figure><img src="/files/BJBPioivCOYEiVcebwXu" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/9JDlDgwECPY6cCqikssc" alt=""><figcaption></figcaption></figure>

2024.01.12 jinny


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ohmyapp.io/main/guide/develop_app/command-execute-function/create-logic/event-option/cron.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
