Skip to content

Cron Job

Cron Job #140

Workflow file for this run

name: Cron Job
on:
schedule:
# At every 4 hours
- cron: "0 */4 * * *"
jobs:
fetch:
name: FetchLeaderBoard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: yarn install using Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- run: yarn install
- run: yarn leaderboard
env:
SERVER_URL: ${{ secrets.SERVER_URL }}
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
MONGODB_URL: ${{ secrets.MONGODB_URL }}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "feat: updated leaderboard using GitHub workflow"