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
gform inspect <form>
gform insp 'https://docs.google.com/forms/d/e/…/viewform'
gform inspect <form> --jsonKnow login / captcha / file-upload / closed flags before you scale concurrency. Details: inspect-verify.
Repeat and concurrency
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| Flag | Role |
|---|---|
--repeat / -r | Number of child runs (batch) |
--concurrency / -C | Parallel workers — max 16, also capped at repeat |
--delay / -D | Pause 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-error | Keep going after child failures |
--no-live / -nl | Disable live worker panel on TTY |
Duplicate protection
Successful payloads append to $GFORM_HOME/history.jsonl.
gform run <form> --once
gform run <form> --repeat 5 --skip-duplicates| Mechanism | Behavior |
|---|---|
--once | Skip if fingerprint already succeeded |
--skip-duplicates / -sd | Skip resolved fingerprints already succeeded |
options.unique | Field-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.
- action: radio
question: "Age range?"
value: "18-25"
pool: ["18-25", "26-35", "36-45"]
- action: text
question: "Comments"
value: "default"
pool:
- "Answer A ({{i}})"
- "Answer B ({{i}})"{{i}} / {{run}} 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
| Mode | Behavior |
|---|---|
rotate (default) | pool[(runIndex-1) % length] |
random | Random pick each run |
zip | Shared index across equal-length pools (persona rows) |
gform run <form> --repeat 10 --variant-mode random --skip-duplicates
gform run <form> -r 3 -vm zipOr in YAML:
options:
variantMode: zipzip 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.