I am trying to run a job using schedule library. The job is getting triggered two times by itself. Below is the code and it’s output

import schedule
import time

from datetime import datetime

def db_table_status_email_job():
   
    print("Running db_table_status_email_job", datetime.now())

    return schedule.CancelJob


schedule.every(1).minutes.do(db_table_status_email_job)

if __name__ == "__main__":
    
    print('Scheduler Initiated .. Thanks')

    while True:
        
        schedule.run_pending()
        
        time.sleep(1)
        
        now = datetime.now()
        current_time = now.strftime("%H:%M:%S")
        # print("Current Time:", current_time)

Output:

Scheduler Initiated .. Thanks
Running db_table_status_email_job 2024-04-04 12:12:59.194115
Running db_table_status_email_job 2024-04-04 12:12:59.194115