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

About task execution time #170

Open
rtywei opened this issue Jun 11, 2021 · 1 comment
Open

About task execution time #170

rtywei opened this issue Jun 11, 2021 · 1 comment

Comments

@rtywei
Copy link

rtywei commented Jun 11, 2021

My task is set to execute time, but it does not take effect。
I want to execute once every minute, at 00 seconds 。So I used this method。 At。But the exection is 56 seconds。

For example,
gocron.Every(1).Minute().At("00:00:00").Do(db.task)
but run time is I0611 15:40:55.602110
image

@JohnRoesler
Copy link
Contributor

Hi @rtywei - this repo is no longer maintained. Take a look at our active fork over at https://github.com/go-co-op/gocron

The At() method doesn't work with minutes. However, you could use StartAt() to get your task to start at the next minute using time and rounding.

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

2 participants