Skip to content

A small wrapper object for Cronitor.io cron job monitoring service.

License

Notifications You must be signed in to change notification settings

jordanbrauer/cronitor-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cronitor-php

A small wrapper object for Cronitor.io cron job monitoring service.

Downloading & Installing

Composer

$ composer require jordanbrauer/cronitor-php

Setup

require_once "vendor/autoload.php";

use \Cronitor\Monitor;

Minimal

$cronitor = new Monitor("monitor_id");

Extended

$cronitor = new Monitor("monitor_id", [
  "base_url" => "https://cronitor.link",
  "auth_key" => "your_private_secret_confidential_auth_key",
]);

Usage

run()

run ([ string $message ])

$cronitor->run(); // plain run ping
$cronitor->run("Hello Cronitor!"); // run ping with message

complete()

complete ([ string $message ])

$cronitor->complete(); // plain complete ping
$cronitor->complete("Goodbye Cronitor!"); // complete ping with message

fail()

fail ([ string $message ])

$cronitor->fail(); // plain fail ping
$cronitor->fail("Damn Cronitor!"); // fail ping with message

pause()

pause (integer $duration)

$cronitor->pause(1); // pause for 1 hour

resume()

resume ()

$cronitor->resume(); // resume monitoring

About

A small wrapper object for Cronitor.io cron job monitoring service.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages