-
-
Notifications
You must be signed in to change notification settings - Fork 588
new crontab api for scheduling every one minute #1230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
PR Type
Enhancement
Description
Add per-minute crontab scheduling API endpoint for external triggers
Introduce trigger control flags for watcher and OpenAPI sources
Implement cron expression validation for one-minute intervals
Refactor crontab execution logic with improved service scoping
Diagram Walkthrough
File Walkthrough
CrontabItem.cs
Add trigger control flags to CrontabItem modelsrc/Infrastructure/BotSharp.Abstraction/Crontab/Models/CrontabItem.cs
TriggerByWatcherboolean property (default true) to controlwatcher-based triggering
TriggerByOpenAPIboolean property to control OpenAPI-basedtriggering
conventions
CrontabItemExtension.cs
Implement one-minute interval cron validation logicsrc/Infrastructure/BotSharp.Core.Crontab/Services/CrontabItemExtension.cs
CheckNextOccurrenceEveryOneMinute()forCrontabItem
CrontabController.cs
Add per-minute scheduling endpoint and refactor executionsrc/Infrastructure/BotSharp.OpenAPI/Controllers/Crontab/CrontabController.cs
SchedulingCrontab()endpoint at/crontab/scheduling-per-minutefor per-minute scheduling
GetCrontabItems()helper method to filter crontabs byOpenAPI trigger flag
ExecuteTimeArrivedItem()helper method with proper servicescoping
RunCrontab()to use new helper methodsBotSharp.OpenAPI.csproj
Add crontab core dependency and fix formattingsrc/Infrastructure/BotSharp.OpenAPI/BotSharp.OpenAPI.csproj
BotSharp.Core.Crontabfor crontab extensionservices