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

Provide a consumable channel with custom defined execution stats #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tappoz
Copy link

@tappoz tappoz commented Jun 6, 2018

Many thanks for this library, the way the crontab syntax is parsed is very interesting.

Sometimes I find useful to publish some aggregated execution statistics of the scheduled function. I hope this could be useful to someone else as well.

Also, it looks like a schedule like this "* * * * *" does not start at the beginning of the minute, but just one minute after the execution of the whole program. I am not sure if this is an issue or the expected behavior?

@mileusna
Copy link
Owner

mileusna commented Jun 6, 2018

Crontab package is based on golang tickers that checks scheduled jobs on every minute and starts the ones that should be started according to pattern. So there is no guarantees that it will tick on 00 sec in minute, just that it will tick once per minute.

I guess it will be possible to do what you want with another approach, but I think that would add unnecessary bulkiness to the package. If time precision in seconds is your priority then you might develop your own solution or try to find another package. But I will check how hard would it be to add that feature.

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.

None yet

2 participants