Categorygithub.com/schedule-job/schedule-job-batch
repositorypackage
1.0.0-alpha.1
Repository: https://github.com/schedule-job/schedule-job-batch.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Schedule Job Batch

Docker Image Build With Push Docker Pulls GitHub go.mod Go version Docker Image Size (tag) postgresql

  • Data is processed based on DB and delivered to Agent.
  • DB기반으로 데이터를 가공하여 Agent에 전달합니다.

Addon

Schedule

  • Calculate the date on which it will next run.
  • 다음 일정을 계산합니다.

Request

  • Provides the ability to request API.
  • API 요청할 수 있는 기능을 제공합니다.

Rule Based Replace

  • Supports Body function.
  • Body함수를 지원합니다.
  • to_timestamp
    • Returns a timestamp based on when the task runs.
    • 작업이 실행되는 시점을 기준으로 timestamp를 반환합니다.
    • input
      [:toTimestamp(hour=4, minute=4):]
      
    • output
      1609473840000
      
  • to_timestamp_add_minute
    • Returns a timestamp by adding minutes to when the task runs.
    • 작업이 실행되는 시점에 분을 추가하여 timestamp를 반환합니다.
    • input
      [:toTimestampAddMinute(hour=4, minute=4, add=4):]
      
    • output
      1609474080000
      

Progress

  • Requests are performed based on the DB based on the time of request.
  • 요청 시점을 기준으로 DB 기준으로 Reqeust를 수행합니다.

API

[POST] /api/v1/schedule/pre-next/:name

  • Example

    • /api/v1/schedule/pre-next/everyHour

    • Request

      • Body

        {
          "minute": "32"
        }
        
    • Response

      • Body

        {
          "code": 200,
          "data": "2024-10-06T08:32:00Z"
        }
        

[POST] /api/v1/request/pre-next/:name

  • Example

    • /api/v1/request/pre-next/defaultRequest

    • Request

      • Body

        {
          "id": "1234",
          "url": "https://localhost:8080",
          "method": "GET",
          "body": "[:toTimestamp(hour=10, minute=10):]",
          "headers": {}
        }
        
    • Response

      • Body

        {
          "code": 200,
          "data": {
            "id": "1234",
            "url": "https://localhost:8080",
            "method": "GET",
            "body": "1728209400000",
            "headers": {}
          }
        }
        

[POST] /api/v1/schedule/next/:id

  • Example

    • /api/v1/schedule/next/12345678-1234-5678-1234-567812345678

    • Response

      • Body

        {
          "code": 200,
          "data": "2024-10-06T08:32:00Z"
        }
        

[POST] /api/v1/request/next/:id

  • Example

    • /api/v1/request/next/12345678-1234-5678-1234-567812345678

    • Response

      • Body

        {
          "code": 200,
          "data": {
            "id": "12345678-1234-5678-1234-567812345678",
            "url": "https://localhost:8080",
            "method": "GET",
            "body": "1728209400000",
            "headers": {}
          }
        }
        

[POST] /api/v1/progress/:id

  • Example

    • /api/v1/progress/12345678-1234-5678-1234-567812345678

    • Response

      • Body

        {
          "code": 200,
          "data": "in progress"
        }
        

[POST] /api/v1/progress

  • Example

    • /api/v1/progress

    • Response

      • Body

        {
          "code": 200
          "data": "in progress"
        }