-1

I have python script saved as blocking_oth in spyder and I want to automatically run this script every day at 4 p.m.

I have tried this -

import schedule
import time
import os

def job():
    os.system('Blocking_oth')


schedule.every().day.at("16:05").do(job)

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

But this is giving me error :

"NameError: name 'Blocking_oth' is not defined"

Arkistarvh Kltzuonstev
  • 6,824
  • 7
  • 26
  • 56

1 Answers1

0

Maybe you should do

os.startfile(path[, operation])

os.system is for running cmd commands.