add bash scrip to run cron jobs

This commit is contained in:
2025-03-12 17:32:36 +05:30
parent 8456f04e15
commit 973093c074

14
scripts/cron.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
# Define the working directory
WORKDIR="/root/permit-api"
CRON_DIR="$WORKDIR/cron"
# Navigate to the working directory
cd "$WORKDIR" || { echo "Failed to change directory to $WORKDIR"; exit 1; }
# Execute notificationCleanup.js
node --env-file=.env "$CRON_DIR/notificationCleanup.js"
# Execute archive.js
node --env-file=.env "$CRON_DIR/archive.js"