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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user