SteadyCron.Monitoring
0.1.0
dotnet add package SteadyCron.Monitoring --version 0.1.0
NuGet\Install-Package SteadyCron.Monitoring -Version 0.1.0
<PackageReference Include="SteadyCron.Monitoring" Version="0.1.0" />
<PackageVersion Include="SteadyCron.Monitoring" Version="0.1.0" />
<PackageReference Include="SteadyCron.Monitoring" />
paket add SteadyCron.Monitoring --version 0.1.0
#r "nuget: SteadyCron.Monitoring, 0.1.0"
#:package SteadyCron.Monitoring@0.1.0
#addin nuget:?package=SteadyCron.Monitoring&version=0.1.0
#tool nuget:?package=SteadyCron.Monitoring&version=0.1.0
SteadyCron .NET SDK
SteadyCron.Monitoring is the official .NET code-monitoring SDK for SteadyCron.
Wrap your scheduled jobs with TrackAsync and SteadyCron will:
- Know when a job started, succeeded, or failed
- Alert you when a job doesn't run on time (missed heartbeat)
- Detect stuck runs that start but never finish
The monitor must already exist — create it in the Dashboard, via YAML manifest, or Terraform. The SDK never creates monitors. For a fully code-driven workflow, declare the monitor in your Terraform configuration or YAML manifest and reference it from your application by key: the cron schedule, alert rules, and SDK instrumentation all live in the same repository.
Installation
dotnet add package SteadyCron.Monitoring
Quick start
ASP.NET Core / Generic Host
// Program.cs
builder.Services.AddSteadyCron(o =>
{
o.ApiKey = builder.Configuration["SteadyCron:ApiKey"]; // read-only key
o.Environment = builder.Environment.EnvironmentName; // optional
});
// YourWorker.cs
public class BackupWorker(ISteadyCronMonitor monitor) : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken ct)
{
await monitor.TrackAsync("nightly-db-backup", async ct =>
{
await RunBackupAsync(ct);
}, ct);
}
}
Console / standalone (no DI)
var monitor = SteadyCronMonitor.Create(new SteadyCronOptions
{
ApiKey = Environment.GetEnvironmentVariable("STEADYCRON_API_KEY"),
});
await monitor.TrackAsync("nightly-db-backup", ct => RunBackupAsync(ct));
Authentication
The SDK uses a read-only API key to resolve monitor keys to ping tokens at startup. Create one in:
SteadyCron Dashboard → Settings → API keys → New key → Scope: Read-only
Set it via:
- Environment variable:
STEADYCRON_API_KEY=sc_ro_... SteadyCronOptions.ApiKeydirectly"SteadyCron:ApiKey"inappsettings.json
How it works
- On first use, the SDK calls
GET /api/monitors/resolve?key=<your-key>with the read-only API key to retrieve the ping token. The token is cached for 1 hour (configurable). - All pings are fire-and-forget: a bounded timeout (~5 s) is applied; transport errors are logged and swallowed, never propagated.
- Resolution errors (404 unknown key, 409 ambiguous key, wrong kind) are raised immediately — they indicate misconfiguration.
- On exception inside
TrackAsync, afailping is sent and the original exception is rethrown unchanged.
Configuration
| Property | Default | Env var fallback |
|---|---|---|
ApiKey |
null |
STEADYCRON_API_KEY |
ApiUrl |
https://api.steadycron.com |
STEADYCRON_API_URL |
PingUrl |
https://ping.steadycron.com |
STEADYCRON_PING_URL |
Environment |
null |
STEADYCRON_ENVIRONMENT |
CaptureErrors |
false |
— |
PingTimeout |
5 seconds | — |
ResolveCacheTtl |
1 hour | — |
Direct / token mode (hardened path)
If you cannot use API key resolution (e.g. air-gapped environments), set the ping token directly:
o.Monitors["nightly-db-backup"] = "hRkmWz8oZtlMFzvTAUdnRE";
The token is visible via Job detail → Code monitoring → Reveal ping token in the Dashboard.
Reliability contract
- Ping failures are never propagated. A transport error, timeout, or non-2xx response from a ping is logged at Warning/Debug and discarded.
- Resolution errors always propagate. A 404 or 409 from the resolve endpoint raises on first use; fix the key or remove the decorator.
- Original exceptions pass through unchanged.
TrackAsyncdoes not wrap exceptions. Thefailping is sent before rethrowing. - No ping blocks the job. Pings run inline but are bounded by
PingTimeout(default 5 s). A slow ping delays but never hangs the job.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. 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 is compatible. 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 was computed. |
| .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. |
-
.NETStandard 2.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Http (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Options (>= 8.0.2)
- System.Text.Json (>= 8.0.5)
-
net10.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Http (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 168 | 6/17/2026 |