summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.scripts/crontog5
1 files changed, 5 insertions, 0 deletions
diff --git a/.scripts/crontog b/.scripts/crontog
new file mode 100755
index 0000000..3b0b0a4
--- /dev/null
+++ b/.scripts/crontog
@@ -0,0 +1,5 @@
+#!/bin/bash
+# Toggles all cronjobs off/on.
+# Stores disabled crontabs in ~/.consaved until restored.
+
+([[ -f ~/.cronsaved ]] && cat ~/.cronsaved | crontab - && rm ~/.cronsaved && echo cronjobs renabled.) || ( crontab -l > ~/.cronsaved && crontab -r && echo cronjobs saved and disabled. )