Skip to content
Erik Hennerfors edited this page Nov 27, 2024 · 8 revisions

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.

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.

Getting Started

HostBuilder

When using .NET Generic Host, HostBuilder it is recommended to also install Cronitor.Extensions.Hosting to enable a simpler setup.

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

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.

Clone this wiki locally