Servebolt API (v1)
Submit feedback
Submit feedback
  1. Cronjobs
  • Introduction
  • Auth
    • Signup
      POST
    • Login
      POST
    • User Info
      GET
    • Heartbeat
      GET
    • Refresh Token
      POST
    • Reset Password
      POST
    • Resend SMS verification code
      POST
    • Verify your phone number
      POST
    • MFA Challenge (OTP)
      POST
  • Bolts
    • Access
      • Invite User Contact
      • List Contacts
      • Update Contact Role
      • Delete Contact
    • Databases
      • List Bolt Databases
      • Get Bolt Database
      • Create Bolt Database
      • Update Bolt Database
      • Delete Bolt Database
    • Statistics
      • Dynamic Requests Statistics
      • TTFB Statistics
      • Storage Statistics
      • Content Type Statistics
      • Cache Statistics
      • Environments Dynamic Requests Statistics
      • Environments TTFB Statistics
      • Environments Storage Statistics
    • List Bolts
      GET
    • Bolt Name Validate
      POST
    • Available CMS
      GET
    • Create Bolt
      POST
    • Get Bolt
      GET
    • Get Bolt Environments
      GET
    • Update Bolt
      PUT
    • Archive Bolt
      DELETE
    • Available PHP Versions
      GET
    • Get Bolt Subscription
      GET
    • Bolt Usage
      GET
    • Update Bolt Quota
      POST
    • Transfer Bolt Request
      POST
    • Transfer Bolt Request Copy
      GET
  • Environments
    • Git
      • Get Environment Git Status
      • Create Git Configuration
      • Update Git Configuration
      • Delete Environment Git Repository
      • Deploy Git Repository
      • Regenerate Git Public Key
      • Retrieve Git Repository Branches
      • Test Git Repository Connection
    • Domains
      • List Domains
      • List Environment Domains
      • Get Environment Domain
      • Create Domain Validation
      • Create Environment Domain
      • Delete Domain
      • Get Domain Certificates
      • Link Certificate to Domain
      • Unlink Certificate from Domain
    • Logs
      • Get Environment Apache Access Logs
      • Get Environment Apache Error Logs
      • Get Environment Cron Errors
    • List Environments
    • Create Environment
    • Get Environment
    • Update Environment
    • Delete Environment
    • Purge Environment Cache
    • List Environment Cronjobs
    • Get Environment Statistics
    • Get Environment Available Settings
    • Get Environment PHP Versions
    • Get Environment Usage
    • Get Environment SSH Accesses
    • Create Environment SSH Access
    • Remove Environment SSH Access
    • List Environment Databases
    • Toggle Environment Dev Mode
    • Environment Install Wordpress
    • Environment Optimize Wordpress
  • Locations
    • List Locations
    • Check SL8 Availability
    • Available Countries
  • Databases
    • List Databases
    • Get Database
    • Create Database
    • Update Database
    • Delete Database
    • Link Database
    • Unlink Database
    • Get Slow Queries
  • Cronjobs
    • List Cronjobs
      GET
    • Create Cronjob
      POST
    • Get Cronjob
      GET
    • Update Cronjob
      PATCH
    • Delete Cronjob
      DELETE
  • SSH Keys
    • List SSH Keys
    • Add a new SSH Key
    • Get SSH Key
    • Delete SSH Key
  • Certificates
    • List Certificate Orders
    • Get Certificate Order
    • Order new Certificate
    • Store custom certificate
    • Update Auto-Renewal
    • Verify DNS challenge
    • Delete Certificate Order
  • Billing
    • Pricing Calculator
    • Get Billing Customer Info
    • Update Bolt Subscription
    • List Invoices
    • Download Invoice
  • Profile
    • Get User Profile
    • Update User Profile
    • Update Profile Picture
    • Delete Profile Picture
  1. Cronjobs

Update Cronjob

PATCH
/v1/cronjobs/{cronjobId}
Update the details of a cronjob.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
cronjobId
integer 
required
Header Params
Accept
string 
required
Example:
application/json
Content-Type
string 
required
Example:
application/json
Body Params application/json
data
object 
required
attributes
object 
required
relationships
object 
required
Example
{
  "data": {
    "attributes": {
      "schedule": "* * * * *",
      "command": "bash myscript.sh",
      "comment": "my script",
      "notifications": "none",
      "active": false
    },
    "relationships": {
      "environment": {
        "data": {
          "id": 1785,
          "type": "environments"
        }
      }
    }
  }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://api.servebolt.io/v1/cronjobs/' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data": {
        "attributes": {
            "schedule": "* * * * *",
            "command": "bash myscript.sh",
            "comment": "my script",
            "notifications": "none",
            "active": false
        },
        "relationships": {
            "environment": {
                "data": {
                    "id": 1785,
                    "type": "environments"
                }
            }
        }
    }
}'

Responses

🟢200OK
application/json
Body
data
object 
required
type
string 
required
id
string 
required
attributes
object 
required
relationships
object 
required
links
object 
required
Example
{
  "data": {
    "type": "cronjobs",
    "id": "283",
    "attributes": {
      "active": false,
      "disabled": false,
      "command": "bash myscript.sh",
      "comment": "my script",
      "schedule": "* * * * *",
      "notifications": "none"
    },
    "relationships": {
      "environment": {
        "links": {
          "related": "https://xxx/v1/environments/1785"
        },
        "data": {
          "type": "environments",
          "id": "1785"
        }
      }
    },
    "links": {
      "self": "https://xxx/v1/cronjobs/283"
    }
  }
}
Modified at 2024-05-29 10:06:59
Previous
Get Cronjob
Next
Delete Cronjob
Built with