Skip to content

Commit e9a0ef6

Browse files
committed
chore(ci): update reminders workflow
1 parent 05079ee commit e9a0ef6

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

.github/workflows/reminders.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Reminders
22

33
on:
44
schedule:
5-
# Runs every 2 hours from 12 PM to 8 PM (Beijing time, UTC+8) from Monday to Friday.
6-
# Converted to UTC, 12 PM to 8 PM UTC.
7-
# Minute 0, Hours 4, 6, 8, 10, 12 (UTC), Any day of month, Any month, Days of week 1-5 (Monday to Friday)
8-
- cron: '0 4,6,8,10,12 * * 1-5'
5+
# Runs every 2 hours from 12 PM to 8 PM (Beijing time, UTC+8) from Wednesday to Friday.
6+
# Converted to UTC, 12 PM to 8 PM UTC is 4 AM to 12 PM UTC.
7+
# Minute 0, Hours 4, 6, 8, 10, 12 (UTC), Any day of month, Any month, Days of week 3-5 (Wednesday to Friday)
8+
- cron: '0 4,6,8,10,12 * * 3-5'
99
# Runs on the 27th of every month at 12 PM (Beijing time, UTC+8).
1010
# Converted to UTC, 12 PM Beijing time is 4 AM UTC.
1111
- cron: '0 4 27 * *'
@@ -16,6 +16,10 @@ on:
1616
- cron: '0 17 * * *'
1717
# Runs every day at 11 AM Beijing time (3 AM UTC).
1818
- cron: '0 3 * * *'
19+
# Reminds to go to parents' house next day: 9 PM Beijing Time (1 PM UTC) on Tue, Wed, Thu.
20+
- cron: '0 13 * * 2-4'
21+
# Reminds to go to own house next day: 9 PM Beijing Time (1 PM UTC) on Sun, Mon, Fri, Sat.
22+
- cron: '0 13 * * 0,1,5,6'
1923
workflow_dispatch: # Allows manual triggering
2024

2125
concurrency:
@@ -47,7 +51,7 @@ jobs:
4751
env:
4852
TELEGRAM_BOT2_API_KEY: ${{ secrets.TELEGRAM_BOT2_API_KEY }}
4953
run: python scripts/release/reminders_bot.py --job send_message --message "Punch card in WeCom"
50-
if: github.event.schedule == '0 4,6,8,10,12 * * 1-5'
54+
if: github.event.schedule == '0 4,6,8,10,12 * * 3-5'
5155

5256
- name: Run Telegram script for monthly mortgage reminder
5357
env:
@@ -73,6 +77,18 @@ jobs:
7377
run: python scripts/release/reminders_bot.py --job send_message --message "Time to wake up!"
7478
if: github.event.schedule == '0 3 * * *'
7579

80+
- name: Run Telegram script for parents' house reminder
81+
env:
82+
TELEGRAM_BOT2_API_KEY: ${{ secrets.TELEGRAM_BOT2_API_KEY }}
83+
run: python scripts/release/reminders_bot.py --job send_message --message "Reminder, Go to house of parents tomorrow!"
84+
if: github.event.schedule == '0 13 * * 2-4'
85+
86+
- name: Run Telegram script for own house reminder
87+
env:
88+
TELEGRAM_BOT2_API_KEY: ${{ secrets.TELEGRAM_BOT2_API_KEY }}
89+
run: python scripts/release/reminders_bot.py --job send_message --message "Reminder, Go to your house tomorrow!"
90+
if: github.event.schedule == '0 13 * * 0,1,5,6'
91+
7692
- name: Run Telegram script for test message
7793
env:
7894
TELEGRAM_BOT2_API_KEY: ${{ secrets.TELEGRAM_BOT2_API_KEY }}

0 commit comments

Comments
 (0)