Skip to content

Commit

Permalink
Add repeated actions
Browse files Browse the repository at this point in the history
  • Loading branch information
yorhaha committed Oct 2, 2022
1 parent ea0cd20 commit 0f87f11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Report
on:
workflow_dispatch:
schedule:
- cron: '1 17 * * *'
- cron: '1 17,23 * * *'

permissions:
contents: read
Expand Down
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,12 @@ def submit(s: requests.Session):

result = r.json()
if result.get('m') == "操作成功":
send_message('打卡成功', '打卡成功!')
if time_now.tm_hour >= 6:
send_message('打卡成功', '打卡成功!')
elif result.get('m') == '今天已经填报了':
print(time_str + '今天已经填报了')
if time_now.tm_hour >= 6:
send_message('打卡成功', '打卡成功!')
else:
send_message('打卡失败', r.json().get("m"))

Expand Down

0 comments on commit 0f87f11

Please sign in to comment.