voidrice/.scripts/crontog

6 lines
291 B
Text
Raw Normal View History

2018-07-15 14:43:58 +00:00
#!/bin/bash
# Toggles all cronjobs off/on.
2018-07-16 17:07:14 +00:00
# Stores disabled crontabs in ~/.cronsaved until restored.
2018-07-15 14:43:58 +00:00
2018-07-16 17:07:14 +00:00
([[ -f ~/.cronsaved ]] && cat ~/.cronsaved | crontab - && rm ~/.cronsaved && echo cronjobs re-enabled.) || ( crontab -l > ~/.cronsaved && crontab -r && echo cronjobs saved and disabled. )