1

I am using the schedule python package and would like to run a job every hour at the :00 mark.

Is this possible?

This is the code I have right now:

def schedule_jobs(self, loop):
    logging.info('Starting scheduler...')

    schedule.every(1).hours.do(self._pldown_runner.run_pldown_job, loop)

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

The problem with this is that it runs the job every hour starting from the minute it was actually executed.

Danny
  • 425
  • 7
  • 19

1 Answers1

4

the schedule api supports it:

schedule.every().hour.at(":00").do(my_job)
Roy2012
  • 11,755
  • 2
  • 22
  • 35