Writes a schedule as JSON in the exact {"1": 0, "2": 1, ...} format
consumed by the companion iOS Shortcuts EMA logger
(https://github.com/haomeng797-ship-it/melatonin-ema-logger), so a
generated design can be dropped straight into an existing collection
pipeline.
Arguments
- schedule
A
nof1_schedulefromdesign_schedule().- path
File path for the JSON output, e.g.
"schedule.json".
Examples
sched <- design_schedule(n_days = 70, seed = 20260218)
tmp <- tempfile(fileext = ".json")
write_schedule(sched, tmp)