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
refactor: use aiocron
for better scheduling of the function
#39
Conversation
Fixes #26 |
@diwash007 @hitblast Will it be good if I ran it in the end of every month i.e. 30th? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your help!
First seems more logical. |
Ok then, I'll schedule it for 30th of every month at |
Run the required functions in order for the bot. | ||
""" | ||
@staticmethod | ||
@aiocron.crontab("0 0 1 * *") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see where you are using the environment variable TIME_PERIOD_DAYS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well we don't need the environment variable do we if we schedule it at the first of every month?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not making it to run every month .. It is flexible
we can set it to every day, week, month, fortnight, year, decade, whatever :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not making it to run every month .. It is flexible we can set it to every day, week, month, fortnight, year, decade, whatever :D
Gotcha captain ✌️
The bot is flexible with timing. |
Could you, instead of setting it to the end of every month at |
I'll just use the @aiocron.crontab("0 0 1 * *") I'll do something like @aiocron.crontab(f"0 0 {global_.TIME_PEROID_DAYS} * *") Will that be okay? |
Looks good! Also, there's a small typo if you've noticed :D |
aicron.
Looks Good |
😝 |
No description provided.