Pause a script

Mircea Hutanu voodookid at gmail.com
Tue Feb 6 14:51:08 UTC 2007


On 2/6/07, Mark Haney <mhaney at ercbroadband.org> wrote:
> I have been trying for a bit to do something like this in cron:
>
> <script1><pause for 60 second>;<script2>
>

Why don't you try to put the scripts into one single main script and
put that main script into cron, for example.

#!/bin/bash
/path/to/script1
sleep 60s
/path/to/script2

Hope this helps you.


> Here's the situation, I have a script1 that I want to run and wait 60
> second or so in order to have script2 startup and generate a PID in
> /var/run, then have script1 check for the existence of that PID and
> alert me if it's not there.  My boss told me of a 'timer' command that
> would do this, but I"ve not seen any documentation on it through google
> and others.  Is there some way to accomplish this as is or will I need
> to tweak my scripts?
>
> I know about the sleep command, but I don't think that would work in
> this instance as I don't really want script1 to run immediately.  Does
> that make any sense at all?
>
> --
> Ita erat quando hic adveni.
>
> Mark Haney
> Sr. Systems Administrator
> ERC Broadband
> (828) 350-2415
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>


-- 
------------------------------------
Mircea Hutanu
voodookid at voodookid.ro
------------------------------------




More information about the users mailing list