voidrice/.scripts/crontog

6 lines
288 B
Text
Raw Normal View History

2018-07-15 14:43:58 +00:00
#!/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. )