Hi,
i have to code below working just fine, but i dont knnow how to add the same task (with other .dat file) with a 10 minute interval within this code.
with the kindest regards.
i have to code below working just fine, but i dont knnow how to add the same task (with other .dat file) with a 10 minute interval within this code.
with the kindest regards.
import time import schedule #starttime=time.time() def task(): #Input_file: "C:\\Campbellsci\\LoggerNet\\CR1000_Table1.dat" #Output_file: "C:\\Users\\Makada\\Desktop\\CR1000_Table1 - kopie.dat" while True: """ Not to append duplicate data to output file""" existingLines = set(line.strip() for line in open("C:\\Users\\Makada\\Desktop\\CR1000_Mburg_Data_ONEMIN.dat")) outfile = open("C:\\Users\\Makada\\Desktop\\CR1000_Mburg_Data_ONEMIN.dat", "a+") for content in open("C:\\Campbellsci\\LoggerNet\\CR1000_Mburg_Data_ONEMIN.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(task) while True: schedule.run_pending() time.sleep(1) refresh()