Re: Pause a script

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

 



Mircea Hutanu wrote:
On 2/6/07, Mark Haney <mhaney@xxxxxxxxxxxxxxxx> 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

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux