curl --request POST \
--url https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/resume \
--header 'Authorization: <api-key>'import requests
url = "https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/resume"
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}/resume', 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}/resume",
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}/resume"
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}/resume")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/resume")
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"
}Resume a cron job
Lets a paused cron job start runs again on its schedule. A cron job set to pause past its resource’s cron minutes, while they are used up for this billing cycle, stays paused until the next renewal, which resumes it, and the request is rejected with 422; set its overage to ‘bill’ with PUT …/cronjobs/ to run it now. Resuming one that is not paused changes nothing.
curl --request POST \
--url https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/resume \
--header 'Authorization: <api-key>'import requests
url = "https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/resume"
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}/resume', 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}/resume",
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}/resume"
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}/resume")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.miget.com/api/v1/apps/{uuid}/cronjobs/{id}/resume")
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
Resume 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)

