Cron Jobs
Update an existing Cron Job
PUT
cron_job_id*integerThe ID of the cron job.
Range
1 <= valueAccept*stringapplication/json
Content-Type*stringapplication/json
A JSON object containing the resource data
application/json- body
id*integerThe unique ID of the given Cron Job.
pattern*stringA cron expression consisting of Minute, Hour, Day of Month, Month and Day of Week subexpressions.
name*stringThe name of the cron job. Must not be greater than 60 characters.
command*stringThe command line to be executed when running the cron job. Must be at least 5 characters. Must not be greater than 255 characters.
run_as_user*stringThe name of the system user on behalf of which the cron job will be executed. Must not be greater than 60 characters.
application_id?integerNumeric ID of the application to which the cron job belongs to.
No Content
curl -X PUT 'https://api.devopness.com/cron-jobs/123' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <your_api_token>' \ -H 'Content-Type: application/json' \ -H 'Content-Type: application/json' \ -d '{ "id": 1, "pattern": "0 0 * * *", "name": "My cool cron job", "command": "echo '\''devopness rocks!'\'' | tee -a /tmp/task-output.log", "run_as_user": "root"}'Example Response
Empty