Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jordanbrauer/cronitor-sdk
A small wrapper object for Cronitor.io cron job monitoring service.
https://github.com/jordanbrauer/cronitor-sdk
composer cron cronitor jobs lightweight monitoring php plugin
Last synced: 27 days ago
JSON representation
A small wrapper object for Cronitor.io cron job monitoring service.
- Host: GitHub
- URL: https://github.com/jordanbrauer/cronitor-sdk
- Owner: jordanbrauer
- License: mit
- Created: 2017-05-24T13:57:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-14T22:16:48.000Z (almost 7 years ago)
- Last Synced: 2024-05-28T14:09:23.878Z (5 months ago)
- Topics: composer, cron, cronitor, jobs, lightweight, monitoring, php, plugin
- Language: PHP
- Size: 72.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cronitor-php
A small wrapper object for Cronitor.io cron job monitoring service.
## Downloading & Installing
#### Composer
```shell
$ composer require jordanbrauer/cronitor-php
```## Setup
```php
require_once "vendor/autoload.php";use \Cronitor\Monitor;
```#### Minimal
```php
$cronitor = new Monitor("monitor_id");
```#### Extended
```php
$cronitor = new Monitor("monitor_id", [
"base_url" => "https://cronitor.link",
"auth_key" => "your_private_secret_confidential_auth_key",
]);
```## Usage
#### run()
> `run ([ string $message ])`
```php
$cronitor->run(); // plain run ping
$cronitor->run("Hello Cronitor!"); // run ping with message
```#### complete()
> `complete ([ string $message ])`
```php
$cronitor->complete(); // plain complete ping
$cronitor->complete("Goodbye Cronitor!"); // complete ping with message
```#### fail()
> `fail ([ string $message ])`
```php
$cronitor->fail(); // plain fail ping
$cronitor->fail("Damn Cronitor!"); // fail ping with message
```#### pause()
> `pause (integer $duration)`
```php
$cronitor->pause(1); // pause for 1 hour
```#### resume()
> `resume ()`
```php
$cronitor->resume(); // resume monitoring
```