From 973093c0745d8cc456e4834e6ca04bac9de446cd Mon Sep 17 00:00:00 2001 From: Akhil Meka Date: Wed, 12 Mar 2025 17:32:36 +0530 Subject: [PATCH] add bash scrip to run cron jobs --- scripts/cron.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 scripts/cron.sh 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"