Revalidate SWP Mensa Data Cron Job #10528
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Revalidate SWP Mensa Data Cron Job | |
on: | |
workflow_dispatch: | |
# We've only got 1.000 requests per month, so we don't want to run this too often. | |
# Max 20 Weekdays per month, 1000/20 = 50 requests per weekday | |
# Mensas are typically open from 8:00 until 15:00 (7 hours) | |
# 50/7 = 7.14 requests per hour | |
# We want to run this every 8 minutes between 8:00 and 14:00, only on weekdays | |
schedule: | |
- cron: '*/8 8-14 * * 1-5' | |
jobs: | |
cron: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Call Revalidation API | |
run: | | |
curl --request POST \ | |
--url 'https://bqfzesnwsvziyglfeezk.supabase.co/functions/v1/swpParser' \ | |
--header "Authorization: Bearer ${{ secrets.SUPABASE_KEY }}" |