Public APIAPI ReferenceCrons

Replace an app's cron jobs.

Beta API

The /v1 API contract may change, including breaking changes without compatibility aliases.

PUT/v1/apps/{appId}/crons

A team owner or member can replace all console Cron jobs; an empty array deletes them all. Changes take effect immediately. If crons is declared in nitroship.json, the file declarations overwrite the Cron jobs saved in the console on the next production deployment. Console editing is always allowed, even when file declarations exist. Only users with a verified email can use this.

Authorization

bearerAuth
AuthorizationBearer <token>

Use an access token obtained by logging in or exchanging an API token. First exchange an ntro_ API token for an access token through the login server.

In: header

Path Parameters

appId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/apps/string/crons" \  -H "Content-Type: application/json" \  -d '{    "crons": [      {        "path": "string",        "schedule": "string"      }    ]  }'
{  "configDeclared": true,  "crons": [    {      "lastRun": {        "deploymentId": "string",        "durationMs": 0,        "error": "string",        "finishedAt": "string",        "startedAt": "string",        "status": "string",        "statusCode": 0      },      "nextRunAt": "string",      "path": "string",      "schedule": "string"    }  ],  "source": "string"}