Project

easycron

0.0
No commit activity in last 3 years
No release in over 3 years
EasyCron API Ruby Client.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 3.0

Runtime

 Project Readme

Easycron

EasyCron API Ruby Client.

Build Status

Installation

Add this line to your application's Gemfile:

gem 'easycron'

And then execute:

$ bundle

Or install it yourself as:

$ gem install easycron

Usage

require 'uptimerobot'
require 'pp'

client = Easycron::Client.new(token: '...')

pp client.list
#=> {"status"=>"success",
#    "cron_jobs"=>
#     [{"cron_job_id"=>"123456",
#       "cron_job_name"=>"",
#       "user_id"=>"12345",
#       "url"=>"http://example.com",
#       "cron_expression"=>"* * * * *",
#       "number_failed_time"=>"0",
#       "engine_occupied"=>"1",
#       "log_output_length"=>"0",
#       "email_me"=>"0",
#       "status"=>"1",
#       "created"=>"2010-02-03 04:05:06",
#       "updated"=>"2010-02-03 04:05:06"},
#       ...

response = client.add(
  cron_expression: '0 0 * * *',
  url: 'http://example.com',
  email_me: 0,
  log_output_length: 0)

cron_job_id = response['cron_job_id']

response = client.edit(
  id: cron_job_id,
  cron_expression: '*/5 * * * *',
  url: 'http://www.example.com',
  email_me: 0,
  log_output_length: 0)

API Reference