voidrice/.scripts/crontog

6 lines
390 B
Text
Raw Normal View History

#!/bin/bash
# Toggles all cronjobs off/on.
# Stores disabled crontabs in ~/.consaved until restored.
2018-07-28 07:35:00 +00:00
([[ -f ~/.cronsaved ]] && cat ~/.cronsaved | crontab - && rm ~/.cronsaved && notify-send "Cronjobs have been re-enabled." && echo cronjobs re-enabled.) || ( crontab -l > ~/.cronsaved && crontab -r && echo cronjobs saved and disabled.;notify-send "Cronjobs have been saved and disabled.")