When your Linux server is down, does your program stop running, or does it resume running after?
up vote
3
down vote
favorite
If I run a background program (runs for 3 days) on a Linux server, and whilst it is running the server goes down for an hour, after that hour (when the server is up again) will my program resume running? or will be terminated due to the server going down whilst its execution?
background-process
add a comment |
up vote
3
down vote
favorite
If I run a background program (runs for 3 days) on a Linux server, and whilst it is running the server goes down for an hour, after that hour (when the server is up again) will my program resume running? or will be terminated due to the server going down whilst its execution?
background-process
1
Does "go down" mean being shut down completely or just (for example) disconnected from the network?
– Wieland
May 18 '16 at 18:32
1
Or do you mean the server has suspended (power saving) when you write that the server is down?
– ph0t0nix
May 18 '16 at 18:44
Whether or not a program continues running on system restart is largely dependent on both program and system configuration, and how that is done on whether the program is a system service (i.e. registered withrc.d
, Upstart, orsystemd
) or not. You may also want to look into the@reboot
directive incron
.
– Jules
May 18 '16 at 18:51
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
If I run a background program (runs for 3 days) on a Linux server, and whilst it is running the server goes down for an hour, after that hour (when the server is up again) will my program resume running? or will be terminated due to the server going down whilst its execution?
background-process
If I run a background program (runs for 3 days) on a Linux server, and whilst it is running the server goes down for an hour, after that hour (when the server is up again) will my program resume running? or will be terminated due to the server going down whilst its execution?
background-process
background-process
edited Nov 24 at 20:14
Rui F Ribeiro
38.3k1476127
38.3k1476127
asked May 18 '16 at 18:21
user171010
161
161
1
Does "go down" mean being shut down completely or just (for example) disconnected from the network?
– Wieland
May 18 '16 at 18:32
1
Or do you mean the server has suspended (power saving) when you write that the server is down?
– ph0t0nix
May 18 '16 at 18:44
Whether or not a program continues running on system restart is largely dependent on both program and system configuration, and how that is done on whether the program is a system service (i.e. registered withrc.d
, Upstart, orsystemd
) or not. You may also want to look into the@reboot
directive incron
.
– Jules
May 18 '16 at 18:51
add a comment |
1
Does "go down" mean being shut down completely or just (for example) disconnected from the network?
– Wieland
May 18 '16 at 18:32
1
Or do you mean the server has suspended (power saving) when you write that the server is down?
– ph0t0nix
May 18 '16 at 18:44
Whether or not a program continues running on system restart is largely dependent on both program and system configuration, and how that is done on whether the program is a system service (i.e. registered withrc.d
, Upstart, orsystemd
) or not. You may also want to look into the@reboot
directive incron
.
– Jules
May 18 '16 at 18:51
1
1
Does "go down" mean being shut down completely or just (for example) disconnected from the network?
– Wieland
May 18 '16 at 18:32
Does "go down" mean being shut down completely or just (for example) disconnected from the network?
– Wieland
May 18 '16 at 18:32
1
1
Or do you mean the server has suspended (power saving) when you write that the server is down?
– ph0t0nix
May 18 '16 at 18:44
Or do you mean the server has suspended (power saving) when you write that the server is down?
– ph0t0nix
May 18 '16 at 18:44
Whether or not a program continues running on system restart is largely dependent on both program and system configuration, and how that is done on whether the program is a system service (i.e. registered with
rc.d
, Upstart, or systemd
) or not. You may also want to look into the @reboot
directive in cron
.– Jules
May 18 '16 at 18:51
Whether or not a program continues running on system restart is largely dependent on both program and system configuration, and how that is done on whether the program is a system service (i.e. registered with
rc.d
, Upstart, or systemd
) or not. You may also want to look into the @reboot
directive in cron
.– Jules
May 18 '16 at 18:51
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
When a server goes down, this typically means that it does either poweroff or at least reboots. Servers normally do not go in standby mode like you would configure on your laptop.
If the server goes down, your program stops and doesn't continue unless the server is suspended (which is unlikely). For long running processes it is best to design them so that they save intermediate states/results on a regular basis (e.g. every ten minutes) and are capable of continuing with the last saved data when restarted.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
When a server goes down, this typically means that it does either poweroff or at least reboots. Servers normally do not go in standby mode like you would configure on your laptop.
If the server goes down, your program stops and doesn't continue unless the server is suspended (which is unlikely). For long running processes it is best to design them so that they save intermediate states/results on a regular basis (e.g. every ten minutes) and are capable of continuing with the last saved data when restarted.
add a comment |
up vote
3
down vote
When a server goes down, this typically means that it does either poweroff or at least reboots. Servers normally do not go in standby mode like you would configure on your laptop.
If the server goes down, your program stops and doesn't continue unless the server is suspended (which is unlikely). For long running processes it is best to design them so that they save intermediate states/results on a regular basis (e.g. every ten minutes) and are capable of continuing with the last saved data when restarted.
add a comment |
up vote
3
down vote
up vote
3
down vote
When a server goes down, this typically means that it does either poweroff or at least reboots. Servers normally do not go in standby mode like you would configure on your laptop.
If the server goes down, your program stops and doesn't continue unless the server is suspended (which is unlikely). For long running processes it is best to design them so that they save intermediate states/results on a regular basis (e.g. every ten minutes) and are capable of continuing with the last saved data when restarted.
When a server goes down, this typically means that it does either poweroff or at least reboots. Servers normally do not go in standby mode like you would configure on your laptop.
If the server goes down, your program stops and doesn't continue unless the server is suspended (which is unlikely). For long running processes it is best to design them so that they save intermediate states/results on a regular basis (e.g. every ten minutes) and are capable of continuing with the last saved data when restarted.
answered May 18 '16 at 18:44
Anthon
59.9k17102163
59.9k17102163
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f283999%2fwhen-your-linux-server-is-down-does-your-program-stop-running-or-does-it-resum%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Does "go down" mean being shut down completely or just (for example) disconnected from the network?
– Wieland
May 18 '16 at 18:32
1
Or do you mean the server has suspended (power saving) when you write that the server is down?
– ph0t0nix
May 18 '16 at 18:44
Whether or not a program continues running on system restart is largely dependent on both program and system configuration, and how that is done on whether the program is a system service (i.e. registered with
rc.d
, Upstart, orsystemd
) or not. You may also want to look into the@reboot
directive incron
.– Jules
May 18 '16 at 18:51