# routine.json

## Routine

As covered in [concepts](/concepts.md#routines), a routine is a collection of files and tests (written for Mocha), that is executed on an interval.&#x20;

This interval, and the rest of the routine configuration is specified in the `routine.json` file within the `.asserted` directory of a given repo.

## .asserted/routine.json

This is what a typical `routine.json` file looks like after running `asrtd init` inside a given repo.

```javascript
{
  // Globally-unique Routine ID
  "id": "rt-I5zgwerPGE",
  
  // Globally-unique Project ID
  "projectId": "p-1Hewr0s9Z",
  
  // Routine Name (can be anything up to 30 characters)
  "name": "my-routine",
  
  // Routine Description (can be up to 100 characters)
  "description": "some awesome description",
  
  // Interval to run the routine on
  "interval": {
    "unit": "min",
    "value": 5
  },
  
  // Version of the fixed dependencies included during the
  // run. 
  // - "v1" is the only option for free plans
  // - "custom" may be used for paid plans that require extra dependencies
  "dependencies": "v1",
  
  // Mocha-specific configuration
  "mocha": {
    "files": [
      "**/*.asrtd.js"
    ],
    "ignore": [],
    "bail": false,
    "ui": "bdd"
  },
  
  // Overall timeout in seconds for this routine
  "timeoutSec": 1
}
```

## Updates

Updating the `routine.json` is the only way to modify the interval and other routine configuration parameters. They cannot be modified within the UI.

Updating is simple though, simply open the file in the text editor or IDE of your choice, make the modifications, and then run `asrtd push` using the CLI to push the latest routine code and configuration.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.asserted.io/reference/routine-json.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
