Gateway Timer Scripts Events

Hello everyone,

I’m running some timer scripts in order to get some information from a file.asc, it used to work properly but now it seems that the script is not working in this timer script. If I execute manually in the script console it works. I also tried another print in logs script for testing and works.

It is as if the code was empty. This is my script code.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
import time
import threading
import os
import glob

def getFile():
import os
import os.path
import glob
import system

machine = "MDR 1"
machineFolder = "MDR1"
directory = glob.glob('E:\\' + machineFolder + '\\*.asc')

if len(directory):
	newFile = max(directory, key =os.path.getctime)
	
	previousFile = str(system.tag.read("File Directory/%s" % (machine)).value)


	if str(previousFile) != str(newFile):
		file = open(newFile, "r")
		data = [line for line in file.readlines()]
		file.close()
		system.tag.write("File Directory/%s" % (machine), newFile )
		
		logger = system.util.getLogger("LabTest File Read-%s" %(machine))
		logger.info('New File Available. Parsing file - %s '%(newFile))
		
		return data, machine
	else:
		print 'File is processed !'
		return None, None

else:
	print "Folder has no files"
	return None, None

data, machine = getFile()

if data :
ret = project.LabTesting.parseAlphaFile(data, machine)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
I share with you the thread dumps

Daemon Thread [gateway-script-dedicated-timer-[LabTesting/MDR 1]] id=14689, (TIMED_WAITING)
waiting for: java.util.TaskQueue@57aac92
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Unknown Source)
java.util.TimerThread.run(Unknown Source)
Daemon Thread [gateway-script-dedicated-timer-[LabTesting/MDR 2]] id=14687, (TIMED_WAITING)
waiting for: java.util.TaskQueue@4d46a8d8
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Unknown Source)
java.util.TimerThread.run(Unknown Source)
Daemon Thread [gateway-script-dedicated-timer-[LabTesting/MV 1]] id=14692, (TIMED_WAITING)
waiting for: java.util.TaskQueue@5d2ca7cb
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Unknown Source)
java.util.TimerThread.run(Unknown Source)

I hope you can help me out.
Thanks.

The thread dumps just say the threads are idle in between runs. Look for log entries for script errors.