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?










share|improve this question




















  • 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, or systemd) or not. You may also want to look into the @reboot directive in cron.
    – Jules
    May 18 '16 at 18:51

















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?










share|improve this question




















  • 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, or systemd) or not. You may also want to look into the @reboot directive in cron.
    – Jules
    May 18 '16 at 18:51















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?










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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
















  • 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, or systemd) or not. You may also want to look into the @reboot directive in cron.
    – 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












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.






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    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

























    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.






    share|improve this answer

























      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.






      share|improve this answer























        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.






        share|improve this answer












        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 18 '16 at 18:44









        Anthon

        59.9k17102163




        59.9k17102163






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Morgemoulin

            Scott Moir

            Souastre