Skip to content

The crontab syntax for a job that runs every x minutes, starting at minute y, does not work. #4441

@BriskoCube

Description

@BriskoCube

Package

Sentry

.NET Flavor

.NET

.NET Version

9.0.203

OS

Windows

OS Version

Windows 11

Development Environment

Rider 2024 (Windows)

SDK Version

5.14.0

Self-Hosted Sentry Version

No response

Workload Versions

Installed Workload Id Manifest Version Installation Source

UseSentry or SentrySdk.Init call

builder.WebHost.UseSentry(options =>
{
    options.UseOpenTelemetry();
    options.EnableScopeSync = true;
});

Steps to Reproduce

Calling the method Interval with a cron job set to run every x minutes, starting at minute y, does not work.

var checkInId = _hub.CaptureCheckIn(monitorSlug, CheckInStatus.InProgress, configureMonitorOptions: options => {
    options.Interval("12/5 22 * * *");
});

The web-UI allows this syntax
Image

Expected Result

The ability to set a cron interval that doesn't start with '*' but with any other number.
Valid crons:

  • 12/5 22 * * *
  • 0 2/4 * * *
  • 1/5 2/4 * * *

Actual Result

The exception: System.ArgumentException: The provided crontab does not match the expected format of '* * * * *' translating to 'minute', 'hour', 'day of the month', 'month', and 'day of the week'. is thrown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .net codeBugSomething isn't working

    Projects

    Status

    Done

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions