diff --git a/.github/workflows/batch.yaml b/.github/workflows/batch.yaml new file mode 100644 index 00000000..977d144e --- /dev/null +++ b/.github/workflows/batch.yaml @@ -0,0 +1,20 @@ +name: Schedule Batch Job + +on: + # Runs every 10 minutes from 20:00 to 20:50 UTC, which is 05:00 to 05:50 JST + schedule: + - cron: '0/10 20 * * *' + # manual trigger + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Run batch job + env: + BATCH_API_KEY: ${{ secrets.BATCH_API_KEY }} + run: curl -X POST --header 'authorization:$BATCH_API_KEY' 'https://iesona.com/api/batch/questionLog/refine?take=50' \ No newline at end of file