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