From 9b7cda466bb660799f3f85d6a87cd15fa5915969 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 15 Jul 2018 10:43:58 -0400 Subject: [PATCH] cron toggle script added --- .scripts/crontog | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 .scripts/crontog 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. )