Eventum Logo

Eventum

Input

cron

Input plugin that generates timestamps on a cron schedule with second-level precision.

Generates timestamps on a cron schedule. Supports second-level precision, year fields, and random values via the extended syntax provided by croniter.

Parameters

ParameterTypeDefaultConstraintsDescription
expressionstringRequired. Valid cron expression.Cron expression defining the schedule.
countintegerRequired. > 0Number of timestamps to emit per cron tick.
startVersatileDatetimenullStart of the active range. Defaults to current time if omitted.
endVersatileDatetimenullEnd of the active range. null means run indefinitely.
tagslist of strings[]Tags attached to every timestamp. Accessible in templates via tags.

When both start and end are specified, start must be earlier than or equal to end.

Cron expression format

The standard format is minute hour day month weekday, but croniter extends it with optional seconds and year fields:

FieldPositionAllowed values
Second1st (optional)0–59
Minute2nd0–59
Hour3rd0–23
Day of month4th1–31
Month5th1–12
Day of week6th0–6 (0 = Sunday)
Year7th (optional)1970–2099

Special characters: * (any), , (list), - (range), / (step), R (random value within range).

Examples

Every second:

input:
  - cron:
      expression: "* * * * * *"
      count: 1

Every 5 minutes during business hours:

input:
  - cron:
      expression: "*/5 9-17 * * 1-5"
      count: 1
      start: "2024-01-01"
      end: "2024-12-31"

Burst of 100 events at the top of each hour, tagged:

input:
  - cron:
      expression: "0 * * * *"
      count: 100
      tags: [hourly-burst]

On this page