添加报表生成时间段
This commit is contained in:
parent
c8a7ed09dd
commit
48d0cec7ba
6
func.py
6
func.py
@ -20,10 +20,12 @@ def chat_content_exec(update, context):
|
||||
r = connector.get_connection()
|
||||
text = update.message.text
|
||||
chat_type = update.effective_chat.type
|
||||
if chat_type != "supergroup":
|
||||
return
|
||||
user_id = update.effective_user.id
|
||||
chat_id = update.effective_message.chat_id
|
||||
if chat_type != "supergroup":
|
||||
return
|
||||
# if chat_id not in ["1231242141"]:
|
||||
# return
|
||||
try:
|
||||
username = update.effective_user.username
|
||||
except Exception as e:
|
||||
|
9
main.py
9
main.py
@ -2,11 +2,14 @@ from telegram.ext import Updater
|
||||
from config import TOKEN
|
||||
from func import start_handler, chat_content_handler, check_schedule
|
||||
import schedule
|
||||
from task import do_task
|
||||
from task import do_task, flush_redis
|
||||
import threading
|
||||
|
||||
schedule.every().day.at('23:30').do(do_task).tag('task')
|
||||
# schedule.every(1).minutes.do(do_task).tag('task')
|
||||
schedule.every().day.at('11:00').do(do_task)
|
||||
schedule.every().day.at('18:00').do(do_task)
|
||||
schedule.every().day.at('23:30').do(do_task)
|
||||
schedule.every().day.at('23:59').do(flush_redis)
|
||||
# schedule.every(1).minutes.do(do_task)
|
||||
|
||||
threading.Thread(target=check_schedule).start()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user