Download the PHP package binarybuilds/cronbuzz-php without Composer
On this page you can find all versions of the php package binarybuilds/cronbuzz-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download binarybuilds/cronbuzz-php
More information about binarybuilds/cronbuzz-php
Files in binarybuilds/cronbuzz-php
Package cronbuzz-php
Short Description Official php client for cronbuzz API
License MIT
Informations about the package cronbuzz-php
CronBuzz PHP
This is the official php client for cronbuzz API. Use this client to manage your cronbuzz monitors or send pings from your cron jobs easily.
Installation
This package can be installed using composer.
Sending Pings from your cron jobs
Use the following code to automatically send proper pings to cronbuzz.
The above code will
- send a ping to cronbuzz informing the cron job execution has started
- wraps your code inside a
try
catch
block - sends a ping when your code completes executing.
- If any exception occurred during the execution of your code,
catch
block will catch the execution, Send a ping to cronbuzz informing the cron job failed executing. It will also include the error message. - Re-throws the exception, So you can handle the exceptions as usually.
If for any reason the above code does not work for you, Or if you prefer to send pings manually, Use the below code.
Using API
Authorization
Before you make any requests to the API, You must authenticate using your API key.
This step is not required for sending pings from your cron jobs.
Add the below lines at the beginning of your code.
You can retrieve your team key from the team settings page, and your api token from the profile page.
Monitors
List Monitors
Show Monitor
Create Monitor
Argument | Data Type | Required | Details |
---|---|---|---|
Monitor name | string | Yes | Name of the monitor |
Schedule | string | Yes | monitor cron expression(ex: *) |
max execution | integer | Yes | Maximum execution duration of the monitor in minutes |
notification lists | array | Optional | Array of notification list names to attach to this monitor. If none specified, Default notification list will be attached. |
tags | array | Optional | Array of tags to add to this monitor. |
Update Monitor
Argument | Data Type | Required | Details |
---|---|---|---|
Monitor id | integer | Yes | id of the monitor(This is not the uuid.) |
fields | array | Yes | array of fields to update(ex: ['name' => 'new name', 'execution_duration' => 2] . Array keys must be one of these name ,schedule ,execution_duration ) |
Delete Monitor
Pause Monitor
Resume Monitor
Notification Lists
List Notification Lists
Show Notification List
Create Notification List
Argument | Data Type | Required | Details |
---|---|---|---|
list name | string | Yes | Name of the notification list |
channels | array | Optional | Array of notification channels to add to this list. |
Notification channels format
Update Notification List
Delete Notification List
Tags
List Tags
Show Tag
Create Tag
Update Tag
Delete Tag
Security Vulnerabilities
If you found a security vulnerability with in this package, Please do not use the issue tracker. Instead send an email to [email protected]
. All security vulnerabilities will be addressed promptly.
License
This package is open-sourced software licensed under the MIT license.
All versions of cronbuzz-php with dependencies
ext-json Version *