Arun Jain
Arun Jain

Reputation: 64

How to run apscheduler daily at a specific time?

For example, I am doing this now to run a job daily.

sched.add_job(job_function, 'interval', days=1)

It runs the job daily but there is no specific time.

I want to run the at a specific time like at 11 A.M.

Upvotes: 4

Views: 1850

Answers (1)

Drako Tech
Drako Tech

Reputation: 21

How to define an APScheduler cron job that runs every day at 11am:

scheduler.add_job(
            id='job1',
            func=do_stuff, 
            trigger='cron',
            hour=11
        )

For more info checkout APScheduler Triggers: Cron

Upvotes: 0

Related Questions