View Single Post

   
  #6 (permalink)  
Old 04-11-2008, 12:52 AM
contracer11@gmail.com
 
Posts: n/a
Default Re: Adding line in crontab from command line...

On 9 abr, 17:59, Sharif Rizal <sharif.ri...@gmail.com> wrote:
> On Apr 9, 4:58*pm, Sharif Rizal <sharif.ri...@gmail.com> wrote:
>
>
>
>
>
> > On Apr 9, 2:17*pm, contrace...@gmail.com wrote:

>
> > > Hi:

>
> > > Can you tell me if is there any way to make this task ?

>
> > > 00 1 * * * /monitor_file_system *2>/dev/null *> crontab

>
> > > Thank You !

>
> > If you are trying to do this manually and know vi,

>
> > export EDITOR=/usr/bin/vi
> > crontab -e

>
> > then add your entry then save / quit

>
> > If you are trying to do this from a script,
> > 1. dump the content of the existing crontab to a file
> > * # crontab > /tmp/dump
> > 2. echo "your lines" >> to the corntab file
> > * # echo " 00 1 * * * /monitor_file_system *2>/dev/null" >> /tmp/dump
> > 3. import the new crontab
> > * # crontab /tmp/dump

>
> correction:
> 1. dump the content of the existing crontab to a file
> * # crontab -l > /tmp/dump- Ocultar texto entre aspas -
>
> - Mostrar texto entre aspas -



Is there any way to issue this command ?

rsh machine01 00 1 * * * /monitor_file_system 2>/dev/null > crontab


I need put this entry in 30 machines...


Thanks...

Reply With Quote