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

How can I schedule a job every weekday at a particular time in specific time zone #511

Open
stockmaniacs opened this issue Mar 17, 2022 · 1 comment

Comments

@stockmaniacs
Copy link

Hi,

I am using this to schedule a job

import schedule
import time

def job():
    print("I am doing this job!")


schedule.every().monday.at("14:00").do(job)
schedule.every().tuesday.at("14:00").do(job)
schedule.every().wednesday.at("14:00").do(job)
schedule.every().thursday.at("14:00").do(job)
schedule.every().friday.at("14:00").do(job)

while True:
    schedule.run_pending()
    time.sleep(1)

Now how can I schedule them for Asia/Kolkata time zone?

@nlakvinu
Copy link

nlakvinu commented Mar 31, 2022

You can use
schedule.timezone("+0550").every().day.at("00:00").do(job)

Refer #384

EDIT:

Apologies, at the moment vanilla schedule does not support timezones : https://schedule.readthedocs.io/en/stable/faq.html#does-schedule-support-time-zones

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