feat: add ability to suspend and resume a cron task by ID

This takes advantage of the properties system and allows users to suspend/resume the task at will.
This commit is contained in:
Jose Diaz-Gonzalez
2025-09-21 20:52:57 -04:00
parent 3c7985cd82
commit f99e3a6c9c
6 changed files with 99 additions and 13 deletions

View File

@@ -163,7 +163,7 @@ func TriggerSchedulerAppStatus(scheduler string, appName string) error {
return nil
}
// TriggerSchedulerCronWrite writes out cron entries for a given application
// TriggerSchedulerCronWrite writes out cron tasks for a given application
func TriggerSchedulerCronWrite(scheduler string, appName string) error {
if scheduler != "k3s" {
return nil
@@ -171,7 +171,7 @@ func TriggerSchedulerCronWrite(scheduler string, appName string) error {
cronTasks, err := cron.FetchCronTasks(cron.FetchCronTasksInput{AppName: appName})
if err != nil {
return fmt.Errorf("Error fetching cron entries: %w", err)
return fmt.Errorf("Error fetching cron tasks: %w", err)
}
ctx, cancel := context.WithCancel(context.Background())