The file
Draft
This version may still change before it is published.
A plan is one JSON text (RFC 8259), encoded in UTF-8. Its name SHOULD end in .vpf.json. Its JSON Schema is vpf-1.schema.json, kept in the repository at schema/vpf-1.schema.json.
The file is one object:
| Field | Required | Meaning |
|---|---|---|
$schema | yes | Always the string vpf/1. |
wish | yes | What the person wants, in their words. Whoever does a step is told it. |
start | no | When a run starts (Start). { "on": "asked" } when absent. |
limits | no | How far one run may go (Limits). |
steps | yes | 1 to 200 steps (Steps), done in the order written. |
Every object in a plan accepts only the fields this specification defines. A checker MUST refuse a field it does not define, so that a mistyped name is told and not passed over. A file whose $schema is not vpf/1 is not a plan of this version, and a checker MUST NOT read it as one.
Start
start says when a run starts. It is one object whose on field names the kind:
on | Other fields | A run starts |
|---|---|---|
asked | When the person asks for it. | |
schedule | days, time | On these days at this time of day, where the runner runs. |
every | minutes | Every so many minutes. |
files | paths | When a file of the folder that matches one of the paths changes. |
request | When another program asks the runner, in a way the runner defines. |
daysis a list of one or more ofmon,tue,wed,thu,fri,sat,sun.timeis the time of day asHH:MM, from00:00to23:59.minutesis a whole number of at least 1.pathsis a list of paths or patterns inside the folder, where*stands for any text within a name. At least one MUST not be blank.
A runner that cannot start a run in some way MUST say so when it is given the plan, and MUST NOT run it in another way.
Limits
limits is an object with these fields, all optional:
| Field | Default | Meaning |
|---|---|---|
repeats | 3 | How many times refused work may be done again before the person is asked whether to go on. 1 to 100. |
minutes | 60 | The longest a run may take, in minutes. 1 to 10080 (a week). |
cost | The most one run may cost, in the currency the runner reports costs in. More than 0. | |
month | The most all runs of the plan may cost together in a calendar month, in the same currency. More than 0. |