// Update stops the job (if running) and starts it with any updates
// that were made to the job in the scheduler chain. Job() must be
// called first to put the given job in focus.
Update stops the job (if running) and starts it with any updates
that were made to the job in the scheduler chain. Job() must be
called first to put the given job in focus.
// Update stops the job ( if running ) and starts it with any updates // that were made to the job in the scheduler chain . Job () must be // called first to put the given job in focus .
func (s *Scheduler) Update() (*Job, error) {
	job := s.getCurrentJob()
	if !s.updateJob {
		return job, wrapOrError(job.error, ErrUpdateCalledWithoutJob)
	}
	s.updateJob = false
	job.stop()
	job.ctx, job.cancel = context.WithCancel(context.Background())
	return s.Do(job.function, job.parameters...)
}
func ( s * Scheduler ) Update ( ) ( * Job , error ) { job := s . getCurrentJob ( ) if ! s . updateJob { return job , wrapOrError ( job . error , ErrUpdateCalledWithoutJob ) } s . updateJob = false job . stop ( ) job . ctx , job . cancel = context . WithCancel ( context . Background ( ) ) return s . Do ( job . function , job . parameters ... ) }
Update stops the job (if running) and starts it with any updates
that were made to the job in the scheduler chain.
Update stops the job ( if running ) and starts it with any updates that were made to the job in the scheduler chain .