From 1fea1916de88f3083ba07db810d658812bbb032c Mon Sep 17 00:00:00 2001 From: Mirza Widihananta Date: Mon, 2 Oct 2023 08:08:43 +0700 Subject: [PATCH] fix: scheduler of next_weekly_quiz_generator --- .github/workflows/next_weekly_quiz_generator_staging.yaml | 5 +++-- utils/scripts/next_weekly_quiz_generator.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/next_weekly_quiz_generator_staging.yaml b/.github/workflows/next_weekly_quiz_generator_staging.yaml index 60cf79a..1ce1092 100644 --- a/.github/workflows/next_weekly_quiz_generator_staging.yaml +++ b/.github/workflows/next_weekly_quiz_generator_staging.yaml @@ -1,11 +1,12 @@ name: next weekly quiz generator staging on: schedule: - - cron: "0 0 * * MON" + - cron: "0 17 * * SUN" # MON 00:00 UTC+7 + workflow_dispatch: jobs: next_weekly_quiz_generator: - name: Generate weekly quiz for next week + name: Generate weekly quiz for next week in staging runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/utils/scripts/next_weekly_quiz_generator.py b/utils/scripts/next_weekly_quiz_generator.py index 4969f57..f19dc4a 100644 --- a/utils/scripts/next_weekly_quiz_generator.py +++ b/utils/scripts/next_weekly_quiz_generator.py @@ -27,7 +27,7 @@ microsecond=0 ) result = { - "title": "LATIHAN BEBRAS MINGGUAN #" + config_global_variables["weeklyquiz_number"], + "title": f"LATIHAN BEBRAS MINGGUAN #{config_global_variables['weeklyquiz_number']}", "created_at": str(today), "start_at": str(monday + timedelta(days=7)), "end_at": str(monday + timedelta(days=14)),