voidrice/.scripts/crontog
2018-07-16 20:07:14 +03:00

5 lines
291 B
Bash
Executable file

#!/bin/bash
# Toggles all cronjobs off/on.
# Stores disabled crontabs in ~/.cronsaved until restored.
([[ -f ~/.cronsaved ]] && cat ~/.cronsaved | crontab - && rm ~/.cronsaved && echo cronjobs re-enabled.) || ( crontab -l > ~/.cronsaved && crontab -r && echo cronjobs saved and disabled. )