Add fluent schedule and cron expression builder#39
Merged
Conversation
Implement a Schedule builder with two modes: - Interval expressions: Schedule.Every(5).Minutes - Cron expressions: Schedule.Cron.Daily(hour: 3) and Schedule.Cron.Create() for custom field-by-field building https://claude.ai/code/session_01XFQ49AHWaNZH3pyffR78LN
- Move each public class into its own file under Constants/Scheduling/ to fix CS-R1035 (multiple public classes in single file) - Add ScheduleExpression wrapper type with JSON converter and implicit string conversions, following the same pattern as AssertionRule - Change Monitor.Schedule from string to ScheduleExpression - Update Heartbeat constructor to accept ScheduleExpression - Update all test builders and request tests accordingly https://claude.ai/code/session_01XFQ49AHWaNZH3pyffR78LN
Parameter order is dictated by the JsonConverter<T> base class override. https://claude.ai/code/session_01XFQ49AHWaNZH3pyffR78LN
- Replace C# 8.0 pattern matching with null check for netstandard2.0 - Fully qualify Schedule reference in JobBuilder to avoid clash with method of the same name - Add missing using Cronitor.Models for Request in MonitorTypeTests https://claude.ai/code/session_01XFQ49AHWaNZH3pyffR78LN
CS-R1138 is a third-party analyzer rule, not a compiler warning. Pragma directives only work with compiler warnings. The parameter order is dictated by the JsonConverter<T> base class and cannot be changed. https://claude.ai/code/session_01XFQ49AHWaNZH3pyffR78LN
The Schedule() method shadowed the Schedule static class import, preventing the field initializer from resolving. Fully qualifying also failed because the Cronitor static class shadows the namespace. https://claude.ai/code/session_01XFQ49AHWaNZH3pyffR78LN
Anonymous types have read-only properties, which the Serializer skips due to IgnoreReadOnlyProperties = true. Use ScheduleContainer instead. https://claude.ai/code/session_01XFQ49AHWaNZH3pyffR78LN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement a Schedule builder with two modes: