albrow / jobs

A persistent and flexible background jobs library for go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reschedule with freq

epelc opened this issue · comments

Currently Reschedule() only allows you to set the start time. It doesn't let you change the frequency which means I need to destroy the original job and create a new one. This is more error prone and slower because I need to update reference job id's in my db to do this. It might also be a good idea to let us change a job's retry count.

@epelc thank you. To keep the API consistent and preserve backwards compatibility, I'll add a RescheduleRecurring method. So then we'll have Schedule and ScheduleRecurring which are methods on job.Type and Reschedule and RescheduleRecurring which are methods on job.Job. Targeting this for 0.3.1.

@albrow Thanks!