Skip to content

Backend Cron

Backend Cron #1046

Workflow file for this run

name: Backend Cron
on:
schedule:
- cron: "*/5 * * * *"
workflow_dispatch:
jobs:
run-cron-jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
BACKEND_BASE_URL: https://api.usecoal.xyz
CRON_SECRET: ${{ secrets.COAL_CRON_SECRET }}
steps:
- name: Verify payments
run: |
curl --fail-with-body --silent --show-error \
--request POST \
--header "Authorization: Bearer ${CRON_SECRET}" \
"${BACKEND_BASE_URL}/api/cron/verify-payments"
- name: Retry webhooks
run: |
curl --fail-with-body --silent --show-error \
--request POST \
--header "Authorization: Bearer ${CRON_SECRET}" \
"${BACKEND_BASE_URL}/api/cron/retry-webhooks"
- name: Process subscriptions
run: |
curl --fail-with-body --silent --show-error \
--request POST \
--header "Authorization: Bearer ${CRON_SECRET}" \
"${BACKEND_BASE_URL}/api/cron/process-subscriptions"