diff --git a/scripts/cron.sh b/scripts/cron.sh new file mode 100644 index 0000000..62fb66b --- /dev/null +++ b/scripts/cron.sh @@ -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"