Skip to content

Commit 767cad6

Browse files
Update daily update check workflow to run at 3 AM UTC and modify date check from second-to-last day to yesterday
1 parent a314230 commit 767cad6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/check_updates.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Check Updates
22

33
on:
44
schedule:
5-
- cron: "0 0 * * *" # Runs every day at midnight UTC
5+
- cron: "0 3 * * *" # Runs every day at 3 AM UTC
66

77
jobs:
88
check_updates:
@@ -16,13 +16,13 @@ jobs:
1616
run: |
1717
curl -o optimalfraction.json https://charts-core.peercoinexplorer.net/optimalfraction.json
1818
19-
- name: Check if the second-to-last day is included
19+
- name: Check if yesterday is included
2020
run: |
2121
TODAY=$(date -u +"%Y-%m-%d")
22-
SECOND_LAST_DAY=$(date -u -d "$TODAY - 2 days" +"%Y-%m-%d")
23-
if grep -q "$SECOND_LAST_DAY" optimalfraction.json; then
24-
echo "The second-to-last day ($SECOND_LAST_DAY) is included in the JSON data."
22+
YESTERDAY=$(date -u -d "$TODAY - 1 day" +"%Y-%m-%d")
23+
if grep -q "$YESTERDAY" optimalfraction.json; then
24+
echo "Yesterday ($YESTERDAY) is included in the JSON data."
2525
else
26-
echo "The second-to-last day ($SECOND_LAST_DAY) is NOT included in the JSON data."
26+
echo "Yesterday ($YESTERDAY) is NOT included in the JSON data."
2727
exit 1
2828
fi

0 commit comments

Comments
 (0)