Open Source API Gateway

schedule

Version

Calls the internal API periodically, for example to refresh a token, warm up a cache or send a heartbeat every ten minutes. On every run Membrane sends a GET request to / through the flow and the target of the API, just like a request that came in over HTTP. The first run starts one interval after startup. A run does not start before the previous one has finished. A failed run is logged and not repeated before the next interval.

Every Membrane instance runs its own schedules. If a job should run only once in a cluster, trigger an API from outside instead, for example with a Kubernetes CronJob.

Example Configuration

internal:
name: refresh-token
schedule:
interval: PT10M
flow:
- log: {}
target:
url: https://auth.example.com/token/refresh
internal:
   name: refresh-token
   schedule:
     interval: PT10M
   flow:
     - log: {}
   target:
     url: https://auth.example.com/token/refresh

Syntax

schedule:
interval: <string> # required
schedule:
  interval: <string> # required

Attributes

NameRequiredDefaultDescriptionExamples
intervaltrue-Time between two calls in the ISO 8601 Duration format, e.g. PT30S for 30 seconds, PT10M for 10 minutes or PT1H for one hour. The first call starts one interval after startup. The next call starts one interval after the previous one has finished.PT10M

Can be used in