Pause a script
Mark Haney
mhaney at ercbroadband.org
Tue Feb 6 14:57:16 UTC 2007
Mircea Hutanu wrote:
> 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.
>
>
>
I'm not sure this will help. Here's the situation:
script1 - checks for the existence of test.pid
script2 - the job that actually will create the pid
So if I do what you've suggested above, script1 will run and fail (I'll
get an email saying the PID didn't exist) then 60 seconds later script2
will run and create the pid. Is that not how the sleep command works?
I may end up having to rewrite script1 to continually test for the
existence of the pid, but I was hoping not to have to at the moment
since time is at a premium.
--
Ita erat quando hic adveni.
Mark Haney
Sr. Systems Administrator
ERC Broadband
(828) 350-2415
More information about the fedora-list
mailing list