Skip to content

Commit

Permalink
Add helper from every nth minute cron schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
ejsmith committed Feb 24, 2025
1 parent 426011b commit 06d0469
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Foundatio.Extensions.Hosting/Jobs/Cron.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ public static string Minutely()
return "* * * * *";
}

/// <summary>
/// Returns cron expression that fires every Nth minute.
/// </summary>
public static string Minutely(int minute)
{
return $"0/{minute} * * * *";
}

/// <summary>
/// Returns cron expression that fires every hour at the first minute.
/// </summary>
Expand Down

0 comments on commit 06d0469

Please sign in to comment.