cron 수정

This commit is contained in:
2019-09-15 20:53:23 +09:00
parent 4ea373aff6
commit 089803c599
+4 -2
View File
@@ -5,9 +5,11 @@ import time
import glob import glob
import urllib.request import urllib.request
import concurrent.futures import concurrent.futures
from datetime import datetime
def run(webPath): def run(webPath):
print(webPath) now = datetime.now()
print(now.strftime("%Y-%m-%d %H:%M:%S"), webPath)
obj = urllib.request.urlopen(webPath) obj = urllib.request.urlopen(webPath)
obj.read() obj.read()
@@ -44,7 +46,7 @@ def main():
servList.append(webPath) servList.append(webPath)
with concurrent.futures.ThreadPoolExecutor(max_workers=len(servList)) as executor: with concurrent.futures.ThreadPoolExecutor(max_workers=max(1,len(servList))) as executor:
waiters=[] waiters=[]
for resetPath in autoResetList: for resetPath in autoResetList:
future = executor.submit(run, resetPath) future = executor.submit(run, resetPath)