From e6717a64a29751ebc01e72ae94da458820c9224e Mon Sep 17 00:00:00 2001 From: git Date: Sun, 10 Aug 2025 18:15:40 +0100 Subject: [PATCH] Update Makefile --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index b7c1c96..5b66c9f 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,18 @@ SHELL=/bin/bash +# The cron job you want to add +NEW_CRON="0 3 * * * $(shell pwd)/main.sh" + run-script: # run the main script main.sh install: - # Add entry in crontab - # The cron job you want to add - NEW_CRON="0 3 * * * $(shell pwd)/main.sh" + # Add entry in crontab # Check if it already exists (to avoid duplicates) - ( crontab -l 2>/dev/null | grep -F "$NEW_CRON" ) && echo "Cron already exists." && exit 0 + ( crontab -l 2>/dev/null | grep -F "$(NEW_CRON)" ) && echo "Cron already exists." && exit 0 # Add the new cron safely - ( crontab -l 2>/dev/null; echo "$NEW_CRON" ) | crontab - + ( crontab -l 2>/dev/null; echo "$(NEW_CRON)" ) | crontab - requirements: # Add the necessary packages