본문 바로가기
WIKI 기술 지식 베이스

Job Scheduler Jobs API

원문 보기 위키 갱신

출처: 문서

본문

작업 스케줄러 작업 API

3.2에 도입되었어요 {: .label .label-purple }

작업 API를 사용하면 모든 작업 스케줄러 작업을 볼 수 있어요.

엔드포인트

GET /_plugins/_job_scheduler/api/jobs

쿼리 매개변수

다음 표에서는 사용 가능한 쿼리 매개변수를 나열해요. 모든 쿼리 매개변수는 선택 사항이에요.

매개변수 데이터 타입 설명
by_node Boolean 작업이 실행 중인 노드별로 그룹화된 작업을 반환해요. 기본값은 false예요.

예제 요청

GET /_plugins/_job_scheduler/api/jobs

{% include copy-curl.html %}

예제 응답

{
  "jobs": [
    {
      "job_type": "reports-scheduler",
      "job_id": "Cuu8Z5gBTcOdmakPQ51t",
      "index_name": ".opendistro-reports-definitions",
      "name": "index_report",
      "descheduled": false,
      "enabled": true,
      "enabled_time": "2025-08-01T22:24:08.044Z",
      "last_update_time": "2025-08-01T22:24:08.044Z",
      "last_execution_time": "none",
      "last_expected_execution_time": "none",
      "next_expected_execution_time": "2025-08-04T02:15:00.000Z",
      "schedule": {
        "type": "cron",
        "expression": "15 2 1,15 * 1",
        "timezone": "Africa/Abidjan",
        "delay": "none"
      },
      "lock_duration": "no_lock",
      "jitter": "none"
    },
    {
      "job_type": "scheduler_sample_extension",
      "job_id": "jobid1",
      "index_name": ".scheduler_sample_extension",
      "name": "sample-job-it",
      "descheduled": false,
      "enabled": true,
      "enabled_time": "1970-07-23T00:27:45.353Z",
      "last_update_time": "1970-07-23T00:27:45.353Z",
      "last_execution_time": "2025-08-01T22:28:45.357484385Z",
      "last_expected_execution_time": "2025-08-01T22:28:45.353111804Z",
      "next_expected_execution_time": "2025-08-01T22:29:45.353111804Z",
      "schedule": {
        "type": "interval",
        "start_time": "1970-07-23T00:27:45.353Z",
        "interval": 1,
        "unit": "Minutes",
        "delay": "none"
      },
      "lock_duration": 10,
      "jitter": "none"
    }
  ],
  "failures": [],
  "total_jobs": 2
}

응답 본문 필드

다음 표에서는 모든 응답 본문 필드를 나열해요.

필드 데이터 타입 설명
jobs Array 작업 스케줄러가 보고한 모든 작업을 포함해요.
job_type String 작업을 예약한 플러그인이에요.
job_id String 작업의 고유 식별자예요.
index_name String 작업 정보가 저장된 인덱스예요.
name String 작업 이름이에요. 이름이 반드시 고유한 것은 아니에요.
descheduled Boolean 작업 스케줄러가 작업이 실행되도록 예약되었는지(false) 또는 예약되지 않았는지(true)를 나타내요.
enabled Boolean 작업 스케줄러를 사용하는 플러그인이 정의한 대로 작업이 활성(true)인지 비활성(false)인지 나타내요.
enabled_time String 작업이 원래 예약된 시간이에요.
last_update_time String 작업이 마지막으로 업데이트된 시간이에요.
last_expected_exection_time String 작업이 가장 최근에 실행된 시간이에요.
next_expected_execution_time String 작업이 다음에 실행될 예정인 시간이에요.
schedule Map 작업의 실행 일정이에요. Cron 또는 interval 일정을 정의할 수 있어요.
schedule.type String 일정 유형이에요. 유효한 값은 cron과 interval이에요.
lock_duration Integer 작업이 실행 중에 잠긴 상태로 유지될 수 있는 최대 시간(초)이에요.
jitter Double 시스템 전체에서 동시 실행을 방지하기 위해 작업 실행 시간에 적용되는 임의 지연이에요.
failures Array 작업 보고에 실패한 노드 목록이에요.
total_jobs Integer 모든 노드에서 보고된 총 작업 수예요.

Interval 일정

interval 일정은 다음 필드를 지원해요.

필드 데이터 타입 설명
start_time String 일정 시작 시간이에요.
interval Integer 작업 실행 간의 숫자 간격 기간(예: 10)이에요.
unit String 간격 단위(예: Minutes, Hours, Days)예요.
delay String 실행 전에 작업에 적용되는 고정 시간이에요.

Cron 일정

cron 일정은 다음 필드를 지원해요.

필드 데이터 타입 설명
expression String 일정을 정의하는 Cron 표현식이에요.
timezone String Cron 일정과 연결된 시간대예요.

더 알아보기 (Learn more)