Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support rescheduling jobs #145

Merged
merged 8 commits into from
Apr 1, 2021
Merged

Conversation

JohnRoesler
Copy link
Contributor

@JohnRoesler JohnRoesler commented Mar 26, 2021

What does this do?

  • Adds support for rescheduling jobs using the following syntax:
    func ExampleScheduler_Update() {
    	s := gocron.NewScheduler(time.UTC)
    	j, _ := s.Every("1s").Do(func() {})
    
    	time.Sleep(10 * time.Second)
    	j, _ = s.Job(j).Every("10m").Update()
    
    	time.Sleep(30 * time.Minute)
    	_, _ = s.Job(j).Every(1).Day().At("02:00").Update()
    }

Which issue(s) does this PR fix/relate to?

#72

List any changes that modify/break current functionality

Have you included tests for your changes?

Did you document any new/modified functionality?

  • Updated example_test.go
  • Updated README.md

Notes

@JohnRoesler JohnRoesler marked this pull request as ready for review March 30, 2021 03:56
@JohnRoesler JohnRoesler self-assigned this Mar 30, 2021
@JohnRoesler JohnRoesler merged commit 3de459d into go-co-op:master Apr 1, 2021
@JohnRoesler JohnRoesler deleted the job-rescheduling branch April 1, 2021 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants