LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-07-2008, 04:54 PM   #1
ddenton
Member
 
Registered: May 2007
Posts: 114

Rep: Reputation: 15
Delay startup script until 15 minutes after boot...


I've got an RHEL 4 server running oracle 10g, and I need to the enterprise manager console 10-15 minutes after the server starts. Oracle itself is started automatically, and takes some time to spin up, and I'd like the dbconsole to start automatically, but am not sure how oracle would react if the dbconsole starts while the database instances are starting.

Can anyone give me a tip on how to start an init script or command, just once, after a certain period of time has elapsed? If there's also a way to automate the starting of the dbconsole automatically, I'm open to ideas on that as well.

Thanks in advance...
 
Old 08-07-2008, 05:29 PM   #2
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: SLED, openSUSE
Posts: 1,032

Rep: Reputation: 174Reputation: 174
How about just calling a script at boot the first line of which is

Code:
sleep 900
900 seconds being 15 minutes. You'd have to put the script in to the background of course else the boot sequence would just for 15 minutes.
 
Old 08-07-2008, 05:37 PM   #3
ddenton
Member
 
Registered: May 2007
Posts: 114

Original Poster
Rep: Reputation: 15
I thought sleep in an init script would impact other scripts. Thanks, I'll give sending it to the background a shot...

Last edited by ddenton; 08-07-2008 at 05:39 PM.
 
Old 08-07-2008, 05:42 PM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You could also use the "at" command to run a script at some arbitrary time into the future

Code:
at now + 15 minutes -f your_script
 
Old 08-07-2008, 09:49 PM   #5
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
On RH systems, the last script called is

/etc/rc.local

which is there for exactly this sort of customized startup.
 
Old 08-12-2008, 03:07 PM   #6
ddenton
Member
 
Registered: May 2007
Posts: 114

Original Poster
Rep: Reputation: 15
Thanks all for the replies! I'm using a script to set some variables and start OEM, and using rc.local and "at" to launch it 15 minutes after startup...
 
Old 08-12-2008, 09:16 PM   #7
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Alternately, use a script, whose first line is

sleep 900

and start it from rc.local like this

nohup /path/myscript &

which will disconnect it from the startup and background it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java startup is delayed for minutes Q.. Linux - Software 8 06-12-2008 08:37 PM
some apps opening after a few minutes delay 666 Debian 6 08-21-2006 10:25 AM
Putting a delay in server startup ~=gr3p=~ Linux - Networking 1 06-19-2006 01:44 PM
startup script at boot tigerflag Debian 8 03-31-2005 09:52 AM
why does eth01 fail on startup and delay startup? infantpenguin Linux - Newbie 3 01-28-2005 11:45 AM


All times are GMT -5. The time now is 01:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration