# Scheduled Task Service 分布式定时任务调度服务 - 自研实现,兼容XXL-Job ## 基本信息 - **服务端口**: 8088 - **服务名称**: scheduled-task-service - **模块分支**: 业务域/功能模块 - **数据库**: erp_task ## 功能清单 1. 定时任务 2. 任务调度 3. 任务执行日志 ## API接口 | 方法 | 路径 | 描述 | |------|------|------| | GET | /api/xxl-job/jobinfo/pageList | XxlJobCompatibleController接口 | | GET | /api/xxl-job/jobgroup/pageList | XxlJobCompatibleController接口 | | POST | /api/xxl-job/jobinfo/add | XxlJobCompatibleController接口 | | POST | /api/xxl-job/jobinfo/update | XxlJobCompatibleController接口 | | POST | /api/xxl-job/jobinfo/remove | XxlJobCompatibleController接口 | | POST | /api/xxl-job/jobinfo/stop | XxlJobCompatibleController接口 | | POST | /api/xxl-job/jobinfo/start | XxlJobCompatibleController接口 | | POST | /api/xxl-job/jobinfo/trigger | XxlJobCompatibleController接口 | | GET | /api/task/log/task/{taskId} | TaskExecutionLogController接口 | | GET | /api/task/log/list | TaskExecutionLogController接口 | | GET | /api/task/log/query | TaskExecutionLogController接口 | | GET | /api/task/log/batch/{batchNo} | TaskExecutionLogController接口 | | GET | /api/task/log/retryable | TaskExecutionLogController接口 | | GET | /api/task/log/stats/today | TaskExecutionLogController接口 | | DELETE | /api/task/log/cleanup | TaskExecutionLogController接口 | | GET | /actuator/health | HealthController接口 | | GET | /actuator/prometheus | HealthController接口 | | GET | /actuator/info | 实际生产环境应配置micrometer-registry-prometheus自动暴露指标 | | GET | /api/task/{id} | ScheduledTaskController接口 | | GET | /api/task/list | ScheduledTaskController接口 | | GET | /api/task/running | ScheduledTaskController接口 | | GET | /api/task/stats | ScheduledTaskController接口 | | GET | /api/task/{id}/next-fire-times | ScheduledTaskController接口 | | GET | /api/task/validate-cron | ScheduledTaskController接口 | | GET | /api/task/health | ScheduledTaskController接口 | | POST | /api/task/{id}/start | ScheduledTaskController接口 | | POST | /api/task/{id}/stop | ScheduledTaskController接口 | | POST | /api/task/{id}/pause | ScheduledTaskController接口 | | POST | /api/task/{id}/resume | ScheduledTaskController接口 | | POST | /api/task/{id}/execute | ScheduledTaskController接口 | | PUT | /api/task/{id} | ScheduledTaskController接口 | | DELETE | /api/task/{id} | ScheduledTaskController接口 | ## 数据库表 | 表名 | 说明 | |------|------| | scheduled_task_service_table | 说明 | ## 配置文件 - application.yml: 应用配置 ## 启动方式 ```bash mvn clean package java -jar target/scheduled-task-service.jar ```