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

Cannot Run Job on Sunday 8:00 AM UTC #49

Open
markvincentcaro opened this issue Feb 5, 2018 · 4 comments
Open

Cannot Run Job on Sunday 8:00 AM UTC #49

markvincentcaro opened this issue Feb 5, 2018 · 4 comments

Comments

@markvincentcaro
Copy link

markvincentcaro commented Feb 5, 2018

I have added logs to my application whenever it runs my Job to make sure it has properly executed.

When I schedule my Job on Sunday 8:00 AM UTC, it fails to execute (no logs generated):

// Run function every Sunday at 8:00 AM UTC
go func() {
    gocron.ChangeLoc(time.UTC)    
    gocron.Every(1).Sunday().At("08:00").Do(MyFunction)        
    <- gocron.Start()
}()

However, if I schedule the Job on a different day (e.g. Thursday), it executes (logs were generated):

// Run function every Thursday at 8:00 AM UTC
go func() {
    gocron.ChangeLoc(time.UTC)    
    gocron.Every(1).Thursday().At("08:00").Do(MyFunction)        
    <- gocron.Start()
}()

Is there something I am doing wrong when scheduling my Job on Sunday 8:00 AM UTC, or is there an issue with using gocron for this specific interval?

@markvincentcaro markvincentcaro changed the title Cannot Run Job on Sunday 8:00 AM Only Cannot Run Job on Sunday 8:00 AM UTC Feb 5, 2018
@WingGao
Copy link

WingGao commented Feb 17, 2018

same as Days()

@piotrkochan
Copy link

Bump, anyone? Is is almost a Year now. I have similar issues.

@iambudi
Copy link

iambudi commented Jan 14, 2020

Same thing happen, gocron suddenly does not trigger at certain hour.

go func(config *Config) {
    gocron.Every(1).Day().At("22:00").Do(something, config)
    gocron.Every(1).Day().At("14:00").Do(somethingElse, config)
    <-gocron.Start()
}(config)

It works only at 14:00 but 22:00 no run at all. Is it a bug or has to do with machine time setting?

@iambudi
Copy link

iambudi commented Jan 17, 2020

Same thing happen, gocron suddenly does not trigger at certain hour.

go func(config *Config) {
    gocron.Every(1).Day().At("22:00").Do(something, config)
    gocron.Every(1).Day().At("14:00").Do(somethingElse, config)
    <-gocron.Start()
}(config)

It works only at 14:00 but 22:00 no run at all. Is it a bug or has to do with machine time setting?

Solved, after debugging it's in my fault. My Apologize for this.

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

No branches or pull requests

4 participants