import threadingimport osdef clean_queue (qPath): jobList = os.listdir(qPath) for j in jobList: delPath = "%s/%s" % (qPath, j) os.remove(delPath) print "Removing " + delPathqPath = "/print/queue01"waitTime = 600 #10 minutes#Create timer threadwakeCall = threading.Timer(waitTime, clean_queue, (qPath ,))#Start timer threadwakeCall.start()
Name (required)
email (will not be published) (required)
Website