forked from xieyumc/YuYuWechat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAutoSendMessage.py
More file actions
executable file
·44 lines (42 loc) · 1.31 KB
/
AutoSendMessage.py
File metadata and controls
executable file
·44 lines (42 loc) · 1.31 KB
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
42
43
44
import schedule
import time
import subprocess
def run_script( ExcelFile,
Sheet,
ExcelWechatName,
ExcelWechatSentMessage,
ExcelSentDate,
ExcelAddDate,
Path,
Locale):
subprocess.run(["python", "SendMessageOnce.py",
ExcelFile,
Sheet,
ExcelWechatName,
ExcelWechatSentMessage,
ExcelSentDate,
ExcelAddDate,
Path,
Locale])
def schedule_script_run(ExcelFile,
Sheet,
ExcelWechatName,
ExcelWechatSentMessage,
ExcelSentDate,
ExcelAddDate,
Path,
Locale,
RunTime):
schedule.every().day.at(RunTime).do(run_script(ExcelFile,
Sheet,
ExcelWechatName,
ExcelWechatSentMessage,
ExcelSentDate,
ExcelAddDate,
Path,
Locale))
while True:
schedule.run_pending()
time.sleep(50)
if __name__ == "__main__":
schedule_script_run()