mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-09-08 23:50:48 +02:00
- Add new dependencies: `github.com/joho/godotenv`, `github.com/stretchr/testify`, and `gopkg.in/natefinch/lumberjack.v2` - Remove indirect dependency on `github.com/joho/godotenv` - Refactor JobRunDetails template to separate content rendering for improved testing - Enhance error message display in JobRunDetails template - Introduce new test files for JWT and password functionalities - Add comprehensive tests for database operations and error handling
21 lines
466 B
Go
21 lines
466 B
Go
package scheduler
|
|
|
|
import (
|
|
"github.com/starfleetcptn/gomft/internal/db"
|
|
)
|
|
|
|
// SchedulerInterface defines the interface for job scheduling operations
|
|
type SchedulerInterface interface {
|
|
// ScheduleJob schedules a job based on its cron expression
|
|
ScheduleJob(job *db.Job) error
|
|
|
|
// RunJobNow runs a job immediately
|
|
RunJobNow(jobID uint) error
|
|
|
|
// UnscheduleJob removes a job from the scheduler
|
|
UnscheduleJob(jobID uint)
|
|
|
|
// Stop stops the scheduler
|
|
Stop()
|
|
}
|