diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-28 19:03:01 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-28 19:03:01 +0900 |
| commit | cbd1d349a511da7a861540a5d6ea954d4d06871b (patch) | |
| tree | 92b932d351a9474e7fd0f12c6c973274daaaa0d9 /ar/.local/bin/cron/crontog | |
| parent | 74cb5de14fc06fe97b6fc306f6176f7d6b467b6b (diff) | |
updates
Diffstat (limited to 'ar/.local/bin/cron/crontog')
| -rwxr-xr-x | ar/.local/bin/cron/crontog | 8 |
1 files changed, 4 insertions, 4 deletions
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." |
