Skip to content

Commit 786f47d

Browse files
committed
feat: migrate cron job from Vercel configuration to GitHub Actions workflow
1 parent eee7988 commit 786f47d

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

.github/workflows/cron.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Tracker Cron Job
2+
3+
on:
4+
schedule:
5+
# Run every 30 minutes
6+
- cron: '*/30 * * * *'
7+
workflow_dispatch: # Allows manual trigger from GitHub UI
8+
9+
jobs:
10+
ping_vercel:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Ping Vercel Endpoint
14+
run: |
15+
# Replace YOUR_VERCEL_URL.vercel.app with the actual URL from Vercel
16+
curl -f -s https://${{ secrets.VERCEL_URL }}/trigger-poll || echo 'Failed to ping Vercel, but continuing'

vercel.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,5 @@
55
"source": "/(.*)",
66
"destination": "/tracker.js"
77
}
8-
],
9-
"crons": [
10-
{
11-
"path": "/trigger-poll",
12-
"schedule": "*/30 * * * *"
13-
}
148
]
159
}

0 commit comments

Comments
 (0)