xng_scheduling.py 537 B

1234567891011121314151617181920
  1. import os
  2. import time
  3. import schedule
  4. def run_xng_plus():
  5. # os.system("ps aux | grep xiaoniangao | grep -v grep | awk '{ print $2}' | xargs kill -9")
  6. os.system("python3 xiaoniangao_plus_scheduling2.py")
  7. def run_xng_rule():
  8. os.system("ps aux | grep xiaoniangao | grep -v grep | awk '{ print $2}' | xargs kill -9")
  9. os.system("python3 xiaoniangao_plus_get_userid.py")
  10. if __name__ == "__main__":
  11. schedule.every().day.at("19:34").do(run_xng_plus)
  12. while True:
  13. schedule.run_pending()
  14. time.sleep(1)