-
Notifications
You must be signed in to change notification settings - Fork 1
/
clock.py
41 lines (27 loc) · 931 Bytes
/
clock.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
30
31
32
33
34
35
36
37
38
39
40
41
import codeforces_autotracker_script
from apscheduler.schedulers.blocking import BlockingScheduler
#Link Source :
Akif = "https://codeforces.com/submissions/__SHERLOCK__"
Sagor = "https://codeforces.com/submissions/Shoriful_Islam"
Kamol = "https://codeforces.com/submissions/IncubatorMan"
def run () :
codeforces_autotracker_script.update_sheet(Akif, "Akif")
codeforces_autotracker_script.update_sheet(Sagor, "Sagor")
codeforces_autotracker_script.update_sheet(Kamol, "Kamol")
try :
run()
print("Running Perfectly!")
except :
print("Cannot Extract Data Right Now !")
print("Updated Instantly !")
sched = BlockingScheduler()
print('Waiting for Schedule Update !')
@sched.scheduled_job('interval', minutes=360)
def sched_function():
try:
run()
print("Running Perfectly!")
except:
print("Cannot Extract Data Right Now !")
sched.start()
print('Scheduler Finished')