feat(#29): implement cron job configuration

- Add CronSchedule model to Prisma schema
- Implement CronService with CRUD operations
- Add REST API endpoints for cron management
- Create MoltBot plugin skill definition (SKILL.md)
- TDD: 9 passing tests for CronService
This commit is contained in:
2026-01-29 23:00:48 -06:00
parent 9de0b2f92f
commit 2e6b7d4070
10 changed files with 562 additions and 56 deletions

View File

@@ -0,0 +1,28 @@
import { IsString, IsNotEmpty, Matches, IsOptional, IsBoolean } from "class-validator";
export class CreateCronDto {
@IsString()
@IsNotEmpty()
expression: string;
@IsString()
@IsNotEmpty()
command: string;
}
export class UpdateCronDto {
@IsString()
@IsOptional()
@Matches(/^((\*|[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])\ ?){5}$/, {
message: "Invalid cron expression",
})
expression?: string;
@IsString()
@IsOptional()
command?: string;
@IsBoolean()
@IsOptional()
enabled?: boolean;
}