feat: Implement payroll scheduler backend wiring - #88
Merged
Wilfred007 merged 1 commit intoMar 5, 2026
Merged
Conversation
Contributor
|
Hi @meshackyaro kindly resolve conflicts |
- Add database migrations for schedules and execution_history tables - Implement ScheduleService with CRUD operations and next run calculation - Create REST API endpoints (POST/GET/DELETE /api/schedules) - Implement ScheduleExecutor with cron job for automated payment execution - Integrate with Stellar blockchain for bulk payments - Add comprehensive error handling and validation - Wire cron executor into server startup with graceful shutdown Closes #81
meshackyaro
force-pushed
the
payroll-scheduler-backend-wiring
branch
from
March 3, 2026 10:26
8b1aac7 to
cd09494
Compare
Contributor
Author
|
conflicts resolved please check |
5 tasks
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.
Description
This PR implements the backend infrastructure for automated payroll scheduling, connecting the frontend PayrollScheduler components to a persistent database and cron-based execution system.
Changes
Database Layer
schedulestable migration with frequency, time, payment config, and execution trackingexecution_historytable migration for audit loggingService Layer
ScheduleService: CRUD operations for schedules with next run calculation
calculateNextRun(): Handles once, weekly, biweekly, monthly frequenciescreateSchedule(): Validates and persists schedule configurationsgetActiveSchedules(): Retrieves schedules with paginationcancelSchedule(): Cancels pending schedules with authorization checksupdateAfterExecution(): Updates schedule state after executionScheduleExecutor: Cron-based automated payment execution
processDueSchedules(): Queries and processes due schedules every minuteexecuteSchedule(): Builds and submits Stellar bulk payment transactionsrecordExecution(): Logs execution results to execution_historyinitialize(): Sets up cron job with graceful shutdownAPI Layer
Integration
Error Handling
Testing
Documentation
Closes #82