-
Notifications
You must be signed in to change notification settings - Fork 0
/
scheduler.py
29 lines (22 loc) · 1.16 KB
/
scheduler.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from presscheck import crawler, mostRead, similarity, summaries, todays, updateKeySum
if __name__ == '__main__':
# put your function to start scheduling
crawler.batch_collect()
mostRead.getMostRead()
updateKeySum.insert_keyword()
updateKeySum.insert_summary()
mostRead.insertMostRead(mostRead.reran90k(mostRead.makeDic()))
updateKeySum.insert_keyword()
updateKeySum.insert_summary()
# 많이본뉴스
# sched.add_job(mostRead.insertMostRead(mostRead.rerank(mostRead.makeDic())), 'interval', minute="55")#55분주기
# Keyword,Summary
# sched.add_job(insert_summary, 'interval' ,minute=55) #매 55분마다 함수실행
# sched.add_job(insert_keyword, 'interval' ,minute=55) #매 55분마다
# shced.add_job(similarity.,'interval',minute=55) #55분마다
# Todays
sched.add_job(todays.todays_Keyword(), 'interval' ,hours=24) #하루
sched.add_job(todays.keyword_series(), 'interval' ,hours=6) #6시간단위
sched.add_job(todays.headline(), 'interval' ,hours=24) #하루
sched.add_job(todays.init(),'interval',hours=24) #하루
# sched.start()