Re: crontab or crond

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2004-06-28 at 12:39 -0600, Rodolfo J. Paiz wrote: 
> At 12:22 PM 6/28/2004, Cristiano Soares wrote:
> >Hi all. im having some problems trying to use crontab or cron.d. I want to 
> >run a shell script-1 from 7:00 pm to 11:00 pm, and then run the shell 
> >script-2 from 11:01pm to 6:59 pm. Does anyone know how to do this? Thanks 
> >a lot.
> 
> Scripts don't run for four hours and then stop... they run until they 
> finish and then stop. You cannot control which script is currently running 
> with cron; that is, you cannot *stop* a script with cron, you can only 
> start it. Do you want the script to be run *every single minute*? How often 
> do you want the script to be started?

Well, if they are scripts that loop indefinitely could use one cron
entry to start the script at the beginning of the interval and another
to kill it at the end.  Look at scripts in /etc/init.d for examples of
dealing with PIDs.

Another interpretation of the question could be that you want one or the
other available during the period.  That could be done by a cron
sequence of "ln -fs script-1 script-name", "ln -fs script-2 script-
name", "rm -f script-name".

Need to clarify the question.

Phil




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux