Skip to content

Repeat, pools, and variants ​

How to run a form more than once without submitting the same payload every time.

Related: schema · policies · commands/run · inspect & verify

Inspect first ​

bash
gform inspect <form>
gform insp 'https://docs.google.com/forms/d/e/…/viewform'
gform inspect <form> --json

Know login / captcha / file-upload / closed flags before you scale concurrency. Details: inspect-verify.

Repeat and concurrency ​

bash
gform run <form> --repeat 5 --delay 2s
gform run <form> -r 5 -D 500ms
gform run <form> -r 3 -D 2          # bare number = seconds
gform run <form> -r 10 -C 3 --skip-duplicates
gform run <form> --policy load
FlagRole
--repeat / -rNumber of child runs (batch)
--concurrency / -CParallel workers — max 16, also capped at repeat
--delay / -DPause between sequential runs only (-C 1). Formats: 500ms, 2s, 1m; bare number = seconds. With -C > 1, ignored (warn). Live panel freezes the timer (blue) and shows delaying …; print-and-go logs [run i/N] delaying … (-D).
--continue-on-errorKeep going after child failures
--no-live / -nlDisable live worker panel on TTY

Duplicate protection ​

Successful payloads append to $GFORM_HOME/history.jsonl.

bash
gform run <form> --once
gform run <form> --repeat 5 --skip-duplicates
MechanismBehavior
--onceSkip if fingerprint already succeeded
--skip-duplicates / -sdSkip resolved fingerprints already succeeded
options.uniqueField-level: scope: history | batch

Skipped runs still write a small manifest (status: skipped).

Pools — required for useful repeats ​

Without pools, --repeat 10 --skip-duplicates skips most runs: every fingerprint is identical.

yaml
- action: radio
  question: "Age range?"
  value: "18-25"
  pool: ["18-25", "26-35", "36-45"]

- action: text
  question: "Comments"
  value: "default"
  pool:
    - "Answer A (&#123;&#123;i&#125;&#125;)"
    - "Answer B (&#123;&#123;i&#125;&#125;)"

&#123;&#123;i&#125;&#125; / &#123;&#123;run&#125;&#125; expand to the run number.

Checkbox uses pools: (one pool per value slot). File steps can use pool: (local paths) or urls: (remote). See schema · file-uploads.

Variant modes ​

ModeBehavior
rotate (default)pool[(runIndex-1) % length]
randomRandom pick each run
zipShared index across equal-length pools (persona rows)
bash
gform run <form> --repeat 10 --variant-mode random --skip-duplicates
gform run <form> -r 3 -vm zip

Or in YAML:

yaml
options:
  variantMode: zip

zip with unequal pool lengths fails verify / load / run. Preview personas with gform view <form>.

Cancellation ​

SIGINT cancels the batch; child statuses and artifacts should remain inspectable. Worker cleanup hardening is on the roadmap.