I have several Java applications that starts at boot but these creates a heavy load on boot, so I was wondering if there is a way (or more ways) to delay the startup for these services, with different delay for each service?
Regards,
BTJ
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Delay service startup on boot?
Delay service startup on boot?
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Delay service startup on boot?
Are you aware of the existence of internet search engines? This question has been asked before and there are several answers available on the interweb.
I would use
Then add
That example adds a 30 second delay to the name_of_systemd.unit file. Mutatis mutandis.
I would use
Code: Select all
# systemctl edit name_of_system.unit
Code: Select all
[Service]
ExecStartPre=/bin/sleep 30
deadbang
Re: Delay service startup on boot?
Hmmm.. Didn't think about that way.... Thx..
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Delay service startup on boot?
You should probably check that it works before thanking me. The man page says that ExecStartPre shouldn't be used for long-running commands because they will be fork()ed so it might not work at all. I would check myself but I've just hosed my GNU/Linux partition.
deadbang
Re: Delay service startup on boot?
Ok, not that easy then...
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"