aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/pmsh-pnf-sim/docker-compose/schedulepmjob.py
blob: ecbd74417c4c13e625a9d5d7578599c7d8116bf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import time
import schedule
from pnf import PNF
import pnfconfig

if __name__ == "__main__":
    try:
        pnf = PNF()
        schedule.every(pnfconfig.rop).seconds.do(lambda: pnf.pm_job(pnfconfig.VES_IP, pnfconfig.VES_PORT))
        while True:
            schedule.run_pending()
            time.sleep(1)
    except Exception as error:
        print(error)