A small wrapper object for Cronitor.io cron job monitoring service.
$ composer require jordanbrauer/cronitor-php
require_once "vendor/autoload.php";
use \Cronitor\Monitor;
$cronitor = new Monitor("monitor_id");
$cronitor = new Monitor("monitor_id", [
"base_url" => "https://cronitor.link",
"auth_key" => "your_private_secret_confidential_auth_key",
]);
run ([ string $message ])
$cronitor->run(); // plain run ping
$cronitor->run("Hello Cronitor!"); // run ping with message
complete ([ string $message ])
$cronitor->complete(); // plain complete ping
$cronitor->complete("Goodbye Cronitor!"); // complete ping with message
fail ([ string $message ])
$cronitor->fail(); // plain fail ping
$cronitor->fail("Damn Cronitor!"); // fail ping with message
pause (integer $duration)
$cronitor->pause(1); // pause for 1 hour
resume ()
$cronitor->resume(); // resume monitoring