Tag Archives: crontab

Quick script to add things to crontab

Out of all the options I’ve found manually adding items to crontab in an editor is the best… despite all the typing.   I made a quick script to cut down on the typing.

nano /etc/config/crontab
read -p “Press [Enter] if you’re sure…”
crontab /etc/config/crontab
/etc/init.d/crond.sh restart
echo “Confirm change”
crontab -l

It also allows me to avoid vi.   You must have nano installed for this to work or replace with your editor of choice… even vi.

Exit the editor without saving and Control-C out of the script at the pause if you messed up.