Cronitor 2.0.60

dotnet add package Cronitor --version 2.0.60
                    
NuGet\Install-Package Cronitor -Version 2.0.60
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cronitor" Version="2.0.60" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cronitor" Version="2.0.60" />
                    
Directory.Packages.props
<PackageReference Include="Cronitor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cronitor --version 2.0.60
                    
#r "nuget: Cronitor, 2.0.60"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Cronitor&version=2.0.60
                    
Install Cronitor as a Cake Addin
#tool nuget:?package=Cronitor&version=2.0.60
                    
Install Cronitor as a Cake Tool

Cronitor API Client

Cronitor is a service for heartbeat-style monitoring of anything that can send an HTTP request. It's particularly well suited for monitoring cron jobs, Jenkins jobs, or any other scheduled task.

Nuget Nuget

Supported APIs

This .NET library provides a simple abstraction for the pinging of a Cronitor monitor. For a better understanding of the API this library talks to, please see the documentation, links below.

Install

You can download the cronitor client nuget. https://www.nuget.org/packages/Cronitor

Usage

For the full documentation please read our wiki, telemetry wiki!

NET Generic Host

If you're using .NET HostBuilder and utilizing the default hosting and startup pattern (Microsoft.Extensions.Hosting).

The easiest way to use the client is to run .UseCronitor(), this will create a static instance (Cronitor) of the client that can be used throughout your application.

Examples
await Host.CreateDefaultBuilder()
    .UseCronitor("apiKey")
    .Build()
    .RunAsync();
await Host.CreateDefaultBuilder()
    .UseCronitor((context) => context.Configuration.GetValue<string>("Cronitor:ApiKey"))
    .Build()
    .RunAsync();

If you much rather like to use each client (IssuesClient, MonitorsClient, NotificationsClient or TelemetriesClient) you can use each client on its own by running .ConfigureCronitor() instead, this will not configure the static client.

Examples
await Host.CreateDefaultBuilder()
    .ConfigureCronitor("apiKey")
    .Build()
    .RunAsync();
await Host.CreateDefaultBuilder()
    .ConfigureCronitor((context) => context.Configuration.GetValue<string>("Cronitor:ApiKey"))
    .Build()
    .RunAsync();

And then you'll be able to use these clients like this:

public class SomeClass
{
    private readonly IMonitorsClient _monitorsClient;

    public SomeClass(IMonitorsClient monitorsClient)
    {
        _monitorsClient = monitorsClient;
    }
    
    public Monitor Create()
    {
        var monitor = new Monitor();
        var request = new CreateRequest(monitor);
        var response = _monitorsClient.Create(request);

        return response;
    }

    public async Task<Monitor> CreateAsync()
    {
        var monitor = new Monitor();
        var request = new CreateRequest(monitor);
        var response = await _monitorsClient.CreateAsync(request);

        return resposne;
    }
}

Simple

Examples
using Cronitor.Models;
using Cronitor.Requests;

Cronitor.Configure("apiKey")

var monitor = new Monitor();
var request = new CreateRequest(monitor);
var response = Cronitor.Monitors.Create(request);

Manual

If you only need access to one (or a few) clients you're able to configure each client individually.

Examples
using Cronitor.Models;
using Cronitor.Requests;

public class SomeClass
{
    private readonly IMonitorsClient _monitorsClient;

    public SomeClass()
    {
        _monitorsClient = new IMonitorsClient("apiKey");
    }

    public Monitor Create()
    {
        var monitor = new Monitor();
        var request = new CreateRequest(monitor);
        var response = _monitorsClient.Create(request);

        return response;
    }

    public async Task<Monitor> CreateAsync()
    {
        var monitor = new Monitor();
        var request = new CreateRequest(monitor);
        var response = await _monitorsClient.CreateAsync(request);

        return resposne;
    }
}

Development

Suggestions

  • Add support for Quartz.NET Jobs
  • Implement Timezone constant (if not too big of a hassle to maintain)
  • Implement cron expression-language (if found as needed?)
  • Implement Cronitor assertions-language (if found as needed?)

Contributing

Pull requests and features are happily considered! By participating in this project you agree to abide by the Code of Conduct.

To contribute

Fork, then clone the repo:

git clone git@github.com:your-username/Cronitor.git

Push to your fork and submit a pull request

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Cronitor:

Package Downloads
Cronitor.Extensions.Hosting

Hosting and startup abstractions for Cronitor. When using NuGet 3.x this package requires at least version 3.4....

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.60 190 11/2/2024
1.4.59 580 1/20/2024
1.4.58 362 11/22/2023
1.4.57 214 7/11/2023
1.3.55 182 7/5/2023
1.3.54 171 6/27/2023
1.3.53 186 6/27/2023
1.3.49 218 6/15/2023
1.3.46 275 4/4/2023
1.3.45 263 3/10/2023
1.2.42 860 12/8/2022
1.2.41 381 11/15/2022
1.1.35 376 11/15/2022
1.1.19 1,523 11/9/2022
1.1.16 473 8/12/2022
1.1.14 4,058 7/15/2022
1.1.13 13,655 2/14/2022
1.1.12 826 10/2/2021
1.0.8 415 9/24/2021