Developer Documentation

CronTron was built to be integrated into current dev tools and any processes a company currently has in place.

To accomplish this we have exposed all our functionality through a API that will allow you to:

  • Manage jobs
  • View and pull history
  • Run jobs ad-hoc

The API requires a access token which you will find under your account's settings.

GET
https://api.crontron.com/jobs?token={TOKEN}

Will return:

POST
https://api.crontron.com/jobs

Will create a job in the system, giving a error if a job with the same name already exists. The following properties are expected:

  • token: Your API token
  • name: Name of the job
  • type: Type of the job (HTTP,SSH,SCRIPT)
  • method: Method of the job (GET,POST,PUT)
  • url: URL of the job
  • minute: Minute schedule of the job
  • hour: Hour schedule of the job
  • day_of_week: Day of Week schedule for the job
  • month: Month schedule of the job
  • day_of_month: Day of Month for the job

Will return:

GET
https://api.crontron.com/jobs/{jobid}?token={TOKEN}

Will return a single job in the system:

POST
https://api.crontron.com/jobs/{jobid}

Will update a job in the system, giving a error if a job with the same name already exists. The following properties are expected:

  • token: Your API token
  • name: Name of the job
  • type: Type of the job (HTTP,SSH,SCRIPT)
  • method: Method of the job (GET,POST,PUT)
  • url: URL of the job
  • minute: Minute schedule of the job
  • hour: Hour schedule of the job
  • day_of_week: Day of Week schedule for the job
  • month: Month schedule of the job
  • day_of_month: Day of Month for the job

Will return:

DELETE
https://api.crontron.com/jobs/{jobid}

Will delete a job and return a status 200 with a blank response:

GET
https://api.crontron.com/runs?token={TOKEN}

Will return the historical runs of all jobs. The results can be filtered with the job={jobid} query string to return only from a specific job.

The result property signals the outcome of the request and can be any of the following:

  • success - The run was executed successfully and within it's time limit
  • timeout - The run timed out
  • failed - Unable to connect to the remote server
  • error - CronTron itself had a error

If present the next property offers pagination, use it in your request as the query string ?next={next}.

GET
https://api.crontron.com/runs/{runid}?token={TOKEN}

The result property signals the outcome of the request and can be any of the following:

  • success - The run was executed successfully and within it's time limit
  • timeout - The run timed out
  • failed - Unable to connect to the remote server
  • error - CronTron itself had a error

Will return:

POST
https://api.crontron.com/runs

Manually executes a registered job, these are limited to 10 a hour and require the following properties:

  • token: Your API token
  • jobid: The id of the job

Will return: