Mar-29-2020, 10:39 PM
I'm not sure the ins and outs of those modules, but shoot for something like this:
import time import schedule def task1(): existingLines = set(line.strip() for line in open("C:\\Users\\Makada\\Desktop\\CR1000_Table1 - kopie .dat")) outfile = open("C:\\Users\\Makada\\Desktop\\CR1000_Table1 - kopie .dat", "a+") for content in open("C:\\Campbellsci\\LoggerNet\\CR1000_Table1.dat", "r"): if content.strip() not in existingLines: # to void duplicate lines outfile.write(content) existingLines.add(content) outfile.close() def task2(): existingLines = set(line.strip() for line in open("C:\\Users\\Makada\\Desktop\\CR1000_Table2 - kopie.dat")) outfile = open("C:\\Users\\Makada\\Desktop\\CR1000_Table2 - kopie.dat", "a+") for content in open("C:\\Campbellsci\\LoggerNet\\CR1000_Table2.dat", "r"): if content.strip() not in existingLines: # to void duplicate lines outfile.write(content) existingLines.add(content) outfile.close() schedule.every().minute.at(":01").do(task1) schedule.every().minute.at(":10").do(task2) while True: schedule.run_pending() time.sleep(1) refresh()