voidrice/.scripts/crontog
yuriyurisuki b9702be50c crontog fixed typos & notify-send
notify-send is here because I want to bind this in my i3 config and having information about it.
2018-07-28 08:58:37 +02:00

5 lines
388 B
Bash

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