Wednesday, January 14, 2015

Running Shell scripting from Crontab in Linux


>crontab null
>crontab -l

>vi masterscript
* * * * * pathto.sh pathto.cfg >dev/null >2$1

ESC -> readonly -> :q (Exit)
ESC -> readonly -> :wq! ( save and exit )
ESC -> readonly -> :q! (Force exit)
[ESC: Escape from Insert mode]


>crontab -l
   masterscript

>crontab masterscript


You need to press [Esc] key followed by the colon (:) before typing the following commands:
eg, [ESC]  :wq!


No comments:

Post a Comment