jordanbrauer / cronitor-php
A small wrapper object for Cronitor.io cron job monitoring service.
Installs: 20 708
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 10
Type:plugin
Requires
- php: >=7.0
Requires (Dev)
- phpunit/phpunit: ^6.1
This package is auto-updated.
Last update: 2024-11-16 13:16:01 UTC
README
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