Pause a cron job
curl --request POST \
--url https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/pause \
--header 'Authorization: <api-key>'import requests
url = "https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/pause"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/pause', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/pause"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/pause")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"uuid": "<string>",
"name": "<string>",
"label": "<string>",
"schedule_type": "<string>",
"interval_type": "<string>",
"hour": "<string>",
"minute": "<string>",
"cron_expression": "<string>",
"command": "<string>",
"size": "<string>",
"overage": "<string>",
"max_run_seconds": 123,
"suspended": true,
"status": "<string>",
"last_job_name": "<string>",
"last_job_status": "<string>",
"last_job_run_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}App Cron Jobs
Pause a cron job
Stops a cron job from starting new runs; a run already under way finishes on its own. A paused cron job is not billed and holds nothing in its resource. Pausing one that is already paused changes nothing.
POST
/
api
/
v1
/
apps
/
{uuid}
/
cronjobs
/
{id}
/
pause
Pause a cron job
curl --request POST \
--url https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/pause \
--header 'Authorization: <api-key>'import requests
url = "https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/pause"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/pause', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/pause"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/pause")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"uuid": "<string>",
"name": "<string>",
"label": "<string>",
"schedule_type": "<string>",
"interval_type": "<string>",
"hour": "<string>",
"minute": "<string>",
"cron_expression": "<string>",
"command": "<string>",
"size": "<string>",
"overage": "<string>",
"max_run_seconds": 123,
"suspended": true,
"status": "<string>",
"last_job_name": "<string>",
"last_job_status": "<string>",
"last_job_run_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
Response
Pause a cron job
Api_V1_Entities_Cronjob model
What a run past its resource's cron minutes does: 'pause' until the next renewal, or 'bill', billed by the second. Always 'bill' on Usage Billing or a plan that costs nothing, which include no cron minutes, and 'pause' on an enterprise contract with a cron minute limit; null where its runs are not billed (an enterprise contract without a limit, a resource exempted from billing on a plan that costs nothing, the workspace pool)

