func NewJobScheduler(job Job, options ...JobSchedulerOption) *JobScheduler {
	js := &JobScheduler{
		Latch:       async.NewLatch(),
		BaseContext: context.Background(),
		Job:         job,
	}
	if typed, ok := job.(ScheduleProvider); ok {
		js.JobSchedule = typed.Schedule()
	}
	for _, option := range options {
		option(js)
	}
	return js
}
// NewJobScheduler returns a job scheduler for a given job.
NewJobScheduler returns a job scheduler for a given job.
// NewJobScheduler returns a job scheduler for a given job .
func NewJobScheduler(job Job, options ...JobSchedulerOption) *JobScheduler {
	js := &JobScheduler{
		Latch:       async.NewLatch(),
		BaseContext: context.Background(),
		Job:         job,
	}
	if typed, ok := job.(ScheduleProvider); ok {
		js.JobSchedule = typed.Schedule()
	}
	for _, option := range options {
		option(js)
	}
	return js
}
func NewJobScheduler ( job Job , options ... JobSchedulerOption ) * JobScheduler { js := & JobScheduler { Latch : async . NewLatch ( ) , BaseContext : context . Background ( ) , Job : job , } if typed , ok := job . ( ScheduleProvider ) ; ok { js . JobSchedule = typed . Schedule ( ) } for _ , option := range options { option ( js ) } return js }
NewJobScheduler returns a job scheduler for a given job.
NewJobScheduler returns a job scheduler for a given job .