Skip to content

[request] add schedule processor #273

@artemklevtsov

Description

@artemklevtsov

Hi,
It would be nice to add schedule processor to consume the child input with defined interval or cron.

Use case: read paginated http response with interval.

I can do it only with external scheduler (like cron) now. Or maybe is it possible with current capabilities?

Example:

input:
  # need repeat this block every hour
  read_until:
    check: '@offset >= 5'
    input:
      generate:
        count: 0
        interval: 1s
        mapping: 'root = null'
      processors:
        - mapping: |
            meta n = 5
            meta offset = counter(min: 0)
        - http:
            url: https://httpbin.org/links/${! metadata("n") }/${! metadata("offset") }
            verb: GET

pipeline:
  processors:
    - xml:
        operator: to_json
    - mapping: |
        root = json("html.body.a")
    - unarchive:
        format: json_array
    - mutation: |
        root.page = @offset

output:
  stdout: {}

Possible solutions:

  • add input field to the generate input
  • add schedule input

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions