From 5dd8542f3bd23db934dc6d11b787acaf74671290 Mon Sep 17 00:00:00 2001 From: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Date: Thu, 14 Jul 2022 13:50:46 -0400 Subject: [PATCH] create cron-scheduleEmailReminders --- .../workflows/cron-scheduleEmailReminders.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/cron-scheduleEmailReminders.yml diff --git a/.github/workflows/cron-scheduleEmailReminders.yml b/.github/workflows/cron-scheduleEmailReminders.yml new file mode 100644 index 00000000000000..824ab6480bf182 --- /dev/null +++ b/.github/workflows/cron-scheduleEmailReminders.yml @@ -0,0 +1,23 @@ +name: Cron - scheduleEmailReminders + +on: + # "Scheduled workflows run on the latest commit on the default or base branch." + # β€” https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule + schedule: + # Runs β€œAt minute 0, 15, 30, and 45.” (see https://crontab.guru) + - cron: "0,15,30,45 * * * *" +jobs: + cron-scheduleEmailReminders: + env: + APP_URL: ${{ secrets.APP_URL }} + CRON_API_KEY: ${{ secrets.CRON_API_KEY }} + runs-on: ubuntu-latest + steps: + - name: cURL request + if: ${{ env.APP_URL && env.CRON_API_KEY }} + run: | + curl ${{ secrets.APP_URL }}/api/cron/scheduleEmailReminders \ + -X POST \ + -H 'content-type: application/json' \ + -H 'authorization: ${{ secrets.CRON_API_KEY }}' \ + --fail