Get a cronjob
GET/cronjobs/ {cronjobId}/
v2
GET
cronjob-get-cronjob
Request
- cronjobIdstring (uuid)required
ID of the Cronjob to be retrieved.
Responses
application/json
OK
- Schema-Dokumentation
- Beispiel
- JSON Schema
- activebooleanrequired
- appIdstring (uuid)required
- createdAtstring (date-time)required
- descriptionstringrequired
- destinationone of 2 alternativesrequired
- Alternativeobject
- urlstringrequired
- Alternativeobject
- interpreterstringrequired
- parametersstring
- pathstringrequired
- emailstring (email)
- failedExecutionAlertThresholdinteger (≥ 1)required
- idstring (uuid)required
- intervalstringrequired
- latestExecutionobject
- abortedByobject
- idstring (uuid)
- cronjobIdstringrequired
- durationInMillisecondsinteger (int64)
- endstring (date-time)
- executionEndstring (date-time)deprecated
- executionStartstring (date-time)deprecated
- idstringrequired
- logPathstring
- startstring (date-time)
- statusstring (one of: Complete, Failed, AbortedBySystem, Pending, Running, AbortedByUser, TimedOut)required
- successfulbooleanrequired
- triggeredByobject
- idstring (uuid)
- nextExecutionTimestring (date-time)
- projectIdstring (uuid)
- shortIdstringrequired
- timeoutinteger (≥ 1)required
- updatedAtstring (date-time)required
Content-Type: application/json
{
"active": true,
"appId": "f0f86186-0a5a-45b2-aa33-502777496347",
"createdAt": "2025-10-14T00:37:14.463Z",
"description": "i am a cronjob",
"destination": {
"url": "https://mydomain.com"
},
"email": "email@mittwald.example",
"failedExecutionAlertThreshold": 123,
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"interval": "*/5 * * * *",
"latestExecution": {
"abortedBy": {
"id": "f0f86186-0a5a-45b2-aa33-502777496347"
},
"cronjobId": "string",
"durationInMilliseconds": 12374,
"end": "2025-10-14T00:37:14.463Z",
"id": "cron-bd26li-28027320",
"logPath": "/var/log/cronjobs/cron-bd26li-28027320.log",
"start": "2025-10-14T00:37:14.463Z",
"status": "Complete",
"successful": true,
"triggeredBy": {
"id": "f0f86186-0a5a-45b2-aa33-502777496347"
}
},
"nextExecutionTime": "2025-10-14T00:37:14.463Z",
"projectId": "f0f86186-0a5a-45b2-aa33-502777496347",
"shortId": "cron-bd26li",
"timeout": 123,
"updatedAt": "2025-10-14T00:37:14.463Z"
}
{
"properties": {
"active": {
"type": "boolean"
},
"appId": {
"format": "uuid",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"description": {
"example": "i am a cronjob",
"type": "string"
},
"destination": {
"oneOf": [
{
"properties": {
"url": {
"example": "https://mydomain.com",
"type": "string"
}
},
"required": [
"url"
],
"type": "object"
},
{
"properties": {
"interpreter": {
"example": "/usr/bin/bash",
"type": "string"
},
"parameters": {
"example": "--debug",
"type": "string"
},
"path": {
"example": "/html/my-wordpress/script.sh",
"type": "string"
}
},
"required": [
"interpreter",
"path"
],
"type": "object"
}
]
},
"email": {
"format": "email",
"type": "string"
},
"failedExecutionAlertThreshold": {
"minimum": 1,
"type": "integer"
},
"id": {
"format": "uuid",
"type": "string"
},
"interval": {
"example": "*/5 * * * *",
"type": "string"
},
"latestExecution": {
"properties": {
"abortedBy": {
"properties": {
"id": {
"format": "uuid",
"type": "string"
}
},
"type": "object"
},
"cronjobId": {
"type": "string"
},
"durationInMilliseconds": {
"example": 12374,
"format": "int64",
"type": "integer"
},
"end": {
"format": "date-time",
"type": "string"
},
"executionEnd": {
"deprecated": true,
"format": "date-time",
"type": "string"
},
"executionStart": {
"deprecated": true,
"format": "date-time",
"type": "string"
},
"id": {
"example": "cron-bd26li-28027320",
"type": "string"
},
"logPath": {
"example": "/var/log/cronjobs/cron-bd26li-28027320.log",
"type": "string"
},
"start": {
"format": "date-time",
"type": "string"
},
"status": {
"enum": [
"Complete",
"Failed",
"AbortedBySystem",
"Pending",
"Running",
"AbortedByUser",
"TimedOut"
],
"type": "string"
},
"successful": {
"type": "boolean"
},
"triggeredBy": {
"properties": {
"id": {
"format": "uuid",
"type": "string"
}
},
"type": "object"
}
},
"required": [
"id",
"status",
"successful",
"cronjobId"
],
"type": "object"
},
"nextExecutionTime": {
"format": "date-time",
"type": "string"
},
"projectId": {
"format": "uuid",
"type": "string"
},
"shortId": {
"example": "cron-bd26li",
"type": "string"
},
"timeout": {
"maximum": 86400,
"minimum": 1,
"type": "integer"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"id",
"appId",
"shortId",
"interval",
"active",
"createdAt",
"updatedAt",
"description",
"destination",
"timeout",
"failedExecutionAlertThreshold"
],
"type": "object"
}
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/cronjobs/f0f86186-0a5a-45b2-aa33-502777496347
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.cronjob.getCronjob({
"cronjobId": "f0f86186-0a5a-45b2-aa33-502777496347"
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Cronjob\GetCronjob\GetCronjobRequest;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
$request = (new GetCronjobRequest(
cronjobId: "f0f86186-0a5a-45b2-aa33-502777496347"
));
$response = $client->cronjob()->getCronjob($request);
var_dump($response->getBody();