package agent

import (
	"context"

	"github.com/robfig/cron/v3"
)

type schedulerWorker struct {
	job     Job
	cadence cron.Schedule
}

func (w *schedulerWorker) Run(ctx context.Context) {
	scheduler := NewCronScheduler()
	scheduler.Schedule(ctx, w.cadence, w.job)
	scheduler.Run(ctx)
}
