Skip to content

Refresh API limit Daily #144

Refresh API limit Daily

Refresh API limit Daily #144

name: Refresh API limit Daily
on:
schedule:
- cron: "0 0 * * *" # daily at midnight UTC
workflow_dispatch:
jobs:
refresh_usage_count:
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Set timezone
run: |
sudo timedatectl set-timezone Asia/Kolkata
sudo timedatectl set-ntp true
timedatectl
- name: Checkout stage branch
uses: actions/checkout@v4
with:
ref: stage
- name: Install Mongoose
run: npm install mongoose --legacy-peer-deps
- name: Run refreshUsageCount script
env:
MONGO_URL: ${{ secrets.PROD_MONGO_URL }}
run: node ./packages/app/scripts/refreshUsageCount.js