# `Runic.Runner.Scheduler.FlowBatch`
[🔗](https://github.com/zblanco/runic/blob/main/lib/runic/runner/scheduler/flow_batch.ex#L1)

Scheduler strategy that detects both sequential chains and parallel batch
opportunities.

Extends the chain-detection logic from `Runic.Runner.PromiseBuilder` with
independent-runnable grouping: after sequential chains are extracted, any
remaining standalone runnables that share no graph edges are grouped into a
single `:parallel` Promise for concurrent execution via Flow (or
`Task.async_stream` as fallback).

## Options

  * `:min_chain_length` — minimum chain length to form a sequential Promise (default: 2)
  * `:min_batch_size` — minimum group size to form a parallel Promise (default: 4)
  * `:flow_stages` — max Flow stages for parallel Promises (default: `System.schedulers_online()`)
  * `:flow_max_demand` — Flow max_demand per stage (default: 1)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
