Count ​Count

yaml
type: "io.kestra.plugin.core.execution.count"
yaml
id: executions_count
namespace: company.team

tasks:
  - id: counts
    type: io.kestra.plugin.core.execution.Count
    expression: "{{ count == 0 }}"
    flows:
      - namespace: company.team
        flowId: logs
    startDate: "{{ now() | dateAdd(-1, 'DAYS') }}"

  - id: for_each
    type: io.kestra.plugin.core.flow.ForEach
    concurrencyLimit: 0
    values: "{{ jq outputs.counts.results '. | select(. != null) | .[]' }}"
    tasks:
      - id: slack_incoming_webhook
        type: io.kestra.plugin.notifications.slack.SlackIncomingWebhook
        payload: |
          {
            "channel": "#run-channel",
            "text": ":warning: Flow `{{ jq taskrun.value '.namespace' true }}`.`{{ jq taskrun.value '.flowId' true }}` has no execution for last 24h!"
          }
        url: "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.Schedule
    backfill: {}
    cron: "0 4 * * * "
Properties
SubType
SubType string
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
SubType