From cbd1d349a511da7a861540a5d6ea954d4d06871b Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sat, 28 Jun 2025 19:03:01 +0900 Subject: updates --- ar/.local/bin/cron/crontog | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ar/.local/bin/cron/crontog') diff --git a/ar/.local/bin/cron/crontog b/ar/.local/bin/cron/crontog index 9ebab9c..70e7cf1 100755 --- a/ar/.local/bin/cron/crontog +++ b/ar/.local/bin/cron/crontog @@ -3,7 +3,7 @@ # Toggles all cronjobs off/on. # Stores disabled crontabs in ~/.config/crons until restored. -CRON_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/crons" +cron_file="${XDG_CONFIG_HOME:-$HOME/.config}/crons" # Check if there are any active cronjobs if crontab -l 2>/dev/null | grep -q '^[^#[:space:]]'; then @@ -13,9 +13,9 @@ if crontab -l 2>/dev/null | grep -q '^[^#[:space:]]'; then notify-send "⏰ Cronjobs saved and disabled." else # If no active cronjobs are found, try re-enabling from saved file - if [ -f "$CRON_FILE" ]; then - crontab - <"$CRON_FILE" - rm "$CRON_FILE" + if [ -f "$cron_file" ]; then + crontab - <"$cron_file" + rm "$cron_file" notify-send "🕓 Cronjobs re-enabled." else notify-send "🕰️ No saved cronjobs to re-enable." -- cgit v1.2.3