
11th April 2006, 10:49
|
|
Member
|
|
Join Date: Oct 2005
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
auto start script
Hi
How to i make this to start automatically
5 * * * * /opt/jdk1.5.0_06/bin/java -jar /path/to/jwwim_server_sql2.jar localhost web1_db4 PASSWORD 5190 -l
Thanks.
|

11th April 2006, 14:05
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
Do you want to have this as a cron job? Then run and enter that line there.
|

11th April 2006, 21:34
|
|
Junior Member
|
|
Join Date: Apr 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
Originally Posted by linuxuser1
Hi
How to i make this to start automatically
5 * * * * /opt/jdk1.5.0_06/bin/java -jar /path/to/jwwim_server_sql2.jar localhost web1_db4 PASSWORD 5190 -l
Thanks.
|
You realise that will run at 5 past every hour?
If you mean you want it to start when the box is restarted then some versions of cron (such as Redhat) support @reboot so your crontab entry would be
@reboot /opt/jdk1.5.0_06/bin/java -jar /path/to/jwwim_server_sql2.jar localhost web1_db4 PASSWORD 5190 -l
|

12th April 2006, 11:29
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
If you want to start it at boot time, you simply create a script like /etc/init.d/jwwim_server_sql2:
Code:
#!/bin/bash
/opt/jdk1.5.0_06/bin/java -jar /path/to/jwwim_server_sql2.jar localhost web1_db4 PASSWORD 5190 -l
Then run
Code:
chmod 755 /etc/init.d/jwwim_server_sql2
and create the necessary system startup links. Depending on your distribution you can do it with chkconfig (RedHat, Fedora, CentOS, Mandriva, SuSE) or update-rc.d (Debian, Ubuntu).
|

16th June 2006, 07:00
|
|
Junior Member
|
|
Join Date: May 2006
Location: Chicago, IL. USA
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
Originally Posted by falko
If you want to start it at boot time, you simply create a script like /etc/init.d/jwwim_server_sql2:
Code:
#!/bin/bash
/opt/jdk1.5.0_06/bin/java -jar /path/to/jwwim_server_sql2.jar localhost web1_db4 PASSWORD 5190 -l
Then run
Code:
chmod 755 /etc/init.d/jwwim_server_sql2
and create the necessary system startup links. Depending on your distribution you can do it with chkconfig (RedHat, Fedora, CentOS, Mandriva, SuSE) or update-rc.d (Debian, Ubuntu).
|
Can any program be made to run at startup? for example: a teamspeak server, and a counter strike server. As long as i use the startup commands for the respective servers, in the code?
|

16th June 2006, 17:44
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
Quote:
|
Originally Posted by reddog
Can any program be made to run at startup? for example: a teamspeak server, and a counter strike server. As long as i use the startup commands for the respective servers, in the code?
|
Yes, of course.
|

22nd May 2009, 12:58
|
|
Junior Member
|
|
Join Date: Jun 2008
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
will the above run the commands as root ?
is there a way to create a delay ?
i need to start 2 programs and the first must be already started when the second starts.
i hope this works for centos 5 !
|

23rd May 2009, 13:12
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
Quote:
Originally Posted by atrias
will the above run the commands as root ?
|
Yes.
Quote:
Originally Posted by atrias
is there a way to create a delay ?
i need to start 2 programs and the first must be already started when the second starts.
i hope this works for centos 5 !
|
You can either use the sleep command (see ), or create two cron jobs where the second one is executed after the first one.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 23:54.
|
Recent comments
2 days 14 hours ago
2 days 23 hours ago
3 days 2 hours ago
3 days 3 hours ago
3 days 5 hours ago
3 days 6 hours ago
3 days 8 hours ago
3 days 9 hours ago
4 days 1 hour ago
4 days 2 hours ago