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

Is there a way to schedule a job every hour at the last second, i.e., 59:59? #414

Closed
Six0Six0 opened this issue Jan 13, 2021 · 3 comments
Closed
Labels

Comments

@Six0Six0
Copy link

Six0Six0 commented Jan 13, 2021

I'm a new user. So, please excuse me if I'm not using it as intended.

It accepts every().hour.at("59:59").do(job) but doesn't seem to be doing anything. What am I missing? Also, it seems syntactically inconsistent without the colon preceding the minutes time value.

Wondered if every().hour.at should accept both ":MM:SS" or ":MM". If 2 time values are present, it is interpreted as (minutes, seconds) and if just one time value is present, it is interpreted as minutes.

@SijmenHuizenga
Copy link
Collaborator

Hi! Welcome to Schedule. 😄 You are using schedule exactly as it is intended. 👍

You write that it doesn't seem to do anything, let's investigate! Can you share your some more of your code, including the run_pending part?

The following should schedule the job at the last second before every hour.

schedule.every().hour.at('59:59')

Unfortunately you this is currently a little broken. There is a bug in the latest version (0.6.0) that will cause this code to schedule the job to run at 59:00, instead of 59:59. This bug has been solved in #290 and will be included in the next release.

@Six0Six0
Copy link
Author

Firstly, let me thank you for creating this package and making it open source - it's quite elegant actually and it was exactly what I needed for my use case. Second, thanks for responding. I will await the next rel. to pick up the fix. When do you think we can expect the next rel?

Btw, the code you mentioned is exactly what I was using

schedule.every().hour.at('59:59').do(job)

@SijmenHuizenga
Copy link
Collaborator

Thanks for the compliments!

The next release is quite close, see #412.

I will close this issue now as it seems the question has been answered. Feel free to comment if you still have a question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants