Skip to content

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:

FieldRequiredMeaning
$schemayesAlways the string vpf/1.
wishyesWhat the person wants, in their words. Whoever does a step is told it.
startnoWhen a run starts (Start). { "on": "asked" } when absent.
limitsnoHow far one run may go (Limits).
stepsyes1 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:

onOther fieldsA run starts
askedWhen the person asks for it.
scheduledays, timeOn these days at this time of day, where the runner runs.
everyminutesEvery so many minutes.
filespathsWhen a file of the folder that matches one of the paths changes.
requestWhen another program asks the runner, in a way the runner defines.
  • days is a list of one or more of mon, tue, wed, thu, fri, sat, sun.
  • time is the time of day as HH:MM, from 00:00 to 23:59.
  • minutes is a whole number of at least 1.
  • paths is 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:

FieldDefaultMeaning
repeats3How many times refused work may be done again before the person is asked whether to go on. 1 to 100.
minutes60The longest a run may take, in minutes. 1 to 10080 (a week).
costThe most one run may cost, in the currency the runner reports costs in. More than 0.
monthThe most all runs of the plan may cost together in a calendar month, in the same currency. More than 0.

Code, schema and examples under the Apache License 2.0. Guide text also under CC BY 4.0.