I want test_job function to run everyday at 4 pm how can I do that? This code is working fine for the time interval.
from flask import Flask from apscheduler.schedulers.background import BackgroundScheduler app = Flask(__name__) def test_job(): print('I am working...') @app.route('/') def route(): return 'flask' scheduler = BackgroundScheduler() job = scheduler.add_job(test_job, 'interval', seconds=3) scheduler.start() if __name__ == '__main__': app.run()
you could try this
job = scheduler.add_job(test_job, 'cron', day_of_week ='mon-sun', hour=16, minute=00)
1.4m articles
1.4m replys
5 comments
57.0k users