Skip to content

Provide a consumable channel with custom defined execution stats#4

Open
tappoz wants to merge 1 commit intomileusna:masterfrom
tappoz:execution-stats
Open

Provide a consumable channel with custom defined execution stats#4
tappoz wants to merge 1 commit intomileusna:masterfrom
tappoz:execution-stats

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.

2 participants