Scheduled Commands

Create scheduled command

Schedule a new command to run on an instance.

post/instances/{instance}/scheduled-commands

Request

  • Base URL
    https://cloud.laravel.com/api
  • Auth
    HTTP bearer

Path parameters

instancestring required

The instance identifier

Request body

namestring nullable

A friendly name for the scheduled command.

commandstring required

The command to run. Each command can only be scheduled once per instance.

schedulestring required

A five-field cron expression, evaluated in UTC. The @yearly, @annually, @monthly, @weekly, @daily, @midnight, and @hourly descriptors are also accepted.

Example request

{
  "name": "Prune stale models",
  "command": "php artisan model:prune",
  "schedule": "0 0 * * *"
}

Response

ScheduledCommandResource

Changes

No recorded changes to this operation across all 1 revision of this API.