2

I have a python execute files which runs every 5th minute and 35th minute of every hour. The script contains below code to run the content inside (itcmodel)

    minutetorun = [5,35]
    while True:
        
        thisminute = datetime.now().minute
        if (thisminute in minutetorun) and (thisminute != last_run):
            itcmodel(loaded_model, configdata)
            print("Windows service running.")
            logging.info("Windows service running.")
            last_run = thisminute  

when the current minute matches minutetorun the itcmodel will run.

This entire script is converted to exe file. This exe file is triggered by NSSM. Now my problem is, the service is stopping suddenly after working fine for an entire day or so. I have attached the log file below:

enter image description here

As you can see, the code was running fine until 00:05. Then it stopped giving output. After I restarted the service manually, it started working fine.

What might be the reason for this behavior? if the network was off, I will get the log to this file. I checked the event viewer, it showed no action of system shut down or sleep.

enter image description here

What might be the reason for this behavior?

phoenix
  • 328
  • 2
  • 12
  • We don't know what may have happened on *your* computer. Try to add more logging to your program. – viilpe Mar 24 '21 at 13:20

0 Answers0