cron 수정
This commit is contained in:
+4
-2
@@ -5,9 +5,11 @@ import time
|
||||
import glob
|
||||
import urllib.request
|
||||
import concurrent.futures
|
||||
from datetime import datetime
|
||||
|
||||
def run(webPath):
|
||||
print(webPath)
|
||||
now = datetime.now()
|
||||
print(now.strftime("%Y-%m-%d %H:%M:%S"), webPath)
|
||||
obj = urllib.request.urlopen(webPath)
|
||||
obj.read()
|
||||
|
||||
@@ -44,7 +46,7 @@ def main():
|
||||
|
||||
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=[]
|
||||
for resetPath in autoResetList:
|
||||
future = executor.submit(run, resetPath)
|
||||
|
||||
Reference in New Issue
Block a user