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 for seconds #190

Open
lancecarlson opened this issue Jun 5, 2020 · 1 comment
Open

Support for seconds #190

lancecarlson opened this issue Jun 5, 2020 · 1 comment

Comments

@lancecarlson
Copy link

I noticed that fugit supports second based crons (ie "*/15 * * * * *"). I noticed that this will only run once a minute still. Were there any plans to support seconds?

@hlascelles
Copy link
Owner

Interesting question. Yes I suppose it is possible. The frequency is just stored as a constant here.

Since the scheduler is self enqueueing, I think the best change would be to make it "run every minute, unless it knows it has to run faster". I chose one minute, as a reasonble default. Even if the scheduler "knows" its jobs only run every hour, it still needs to check more often as the dictionary may change (a new deploy) in that hour.

An alternative is to make a new deploy set the speed of the scheduler - but there be dragons. I can imagine an old and a new version getting into a battle setting the "speed".

So in summary, yes very possible. I will have a look and a think at the best/safest method.

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

No branches or pull requests

2 participants