POST
/
api
/
v1
/
apps
/
{uuid}
/
cronjobs
Create a cron job
curl --request POST \
  --url https://app.miget.com/api/v1/apps/{uuid}/cronjobs \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "label": "<string>",
  "schedule_type": "cron",
  "interval_type": "every_10_minutes",
  "cron": "<string>",
  "command": "<string>",
  "daily_time": "<string>",
  "minute": "<string>",
  "hour": "<string>"
}
'
{
  "uuid": "<string>",
  "name": "<string>",
  "type": "<string>",
  "label": "<string>",
  "state": "<string>",
  "quota": {},
  "settings": {},
  "var": {},
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer token for authentication. Format: 'Bearer {token}'

Headers

X-Workspace-Id
string

Workspace ID (uses default workspace if not provided)

Path Parameters

uuid
string
required

Application UUID

Body

application/json

Create a cron job

name
string
required

Unique cron job identifier

label
string

Human-readable display name for the cron job

schedule_type
enum<string>

Schedule type: 'cron' for custom cron expression, 'interval' for predefined intervals

Available options:
cron,
interval
interval_type
enum<string>

Predefined interval: 'every_10_minutes', 'hourly', or 'daily'. Only for interval schedule type.

Available options:
every_10_minutes,
hourly,
daily
cron
string

Cron expression (e.g., '0 * * * *' for hourly). Only for cron schedule type.

command
string

Shell command to execute (e.g., 'rake db:cleanup', 'python script.py')

daily_time
string

Execution time for daily jobs in HH:MM format (24-hour). Only for daily interval.

minute
string

Minute component for scheduling (0-59)

hour
string

Hour component for scheduling (0-23)

Response

Create a cron job

Api_V1_Entities_Addon model

uuid
string
required

Add-on UUID

name
string
required

Add-on name

type
string
required

Add-on type (postgres, mysql, valkey, storage, cronjob)

label
string
required

Display name

state
string
required

Current state

quota
object
required

Resource quota configuration

settings
object
required

Add-on specific settings

var
object
required

Connection environment variables

created_at
string<date-time>
required

Creation timestamp

updated_at
string<date-time>
required

Last update timestamp