How does anacron work if it's not a daemon?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
12
down vote

favorite












I was reading about the differences between cron and anacron and I realized that anacron, unlike cron is not a daemon. So I'm wondering how does it work actually if it's not a daemon.







share|improve this question


























    up vote
    12
    down vote

    favorite












    I was reading about the differences between cron and anacron and I realized that anacron, unlike cron is not a daemon. So I'm wondering how does it work actually if it's not a daemon.







    share|improve this question
























      up vote
      12
      down vote

      favorite









      up vote
      12
      down vote

      favorite











      I was reading about the differences between cron and anacron and I realized that anacron, unlike cron is not a daemon. So I'm wondering how does it work actually if it's not a daemon.







      share|improve this question














      I was reading about the differences between cron and anacron and I realized that anacron, unlike cron is not a daemon. So I'm wondering how does it work actually if it's not a daemon.









      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 15 '17 at 17:21









      Stephen Kitt

      143k22309372




      143k22309372










      asked Dec 15 '17 at 12:52









      tgwtdt

      36019




      36019




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          17
          down vote



          accepted










          It uses a variety of methods to run:



          • if the system is running systemd, it uses a systemd timer (in the Debian package, you’ll see it in /lib/systemd/system/anacron.timer);

          • if the system isn’t running systemd, it uses a system cron job (in /etc/cron.d/anacron);

          • in all cases it runs daily, weekly and monthly cron jobs (in /etc/cron.daily,weekly,monthly/0anacron);

          • it also runs at boot (from /etc/init.d/anacron or its systemd unit).





          share|improve this answer




















          • I've seen the a,b,c notation around; can I use that in my shell? (I don't have access to it right now or I'd test.) Does it mean what it seems to -- that is, all files with the ... replaced with any of the comma-separated things?
            – Nic Hartley
            Dec 15 '17 at 22:11






          • 3




            @QPaysTaxes - Bash (and a few other shells) expands braces in that way - see Bash Reference Manual: Brace Expansion
            – shalomb
            Dec 15 '17 at 22:14

















          up vote
          5
          down vote













          anacron is not a daemon, and therefore it needs to be run periodically by other means. Most often, this means executing it with a cron job once a day, and possibly on bootup as well.



          This may look like the following in root's crontab, for example:



          @reboot /usr/local/sbin/anacron -ds
          @daily /usr/local/sbin/anacron -ds


          Linux systems that uses systemd may do this differently, obviously, but still need to facilitate at least one run of anacron per 24 hour period.



          Running anacron more than once every 24 hours is pointless as the shortest period one can schedule jobs through anacron is once a day.






          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: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            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%2f411051%2fhow-does-anacron-work-if-its-not-a-daemon%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            17
            down vote



            accepted










            It uses a variety of methods to run:



            • if the system is running systemd, it uses a systemd timer (in the Debian package, you’ll see it in /lib/systemd/system/anacron.timer);

            • if the system isn’t running systemd, it uses a system cron job (in /etc/cron.d/anacron);

            • in all cases it runs daily, weekly and monthly cron jobs (in /etc/cron.daily,weekly,monthly/0anacron);

            • it also runs at boot (from /etc/init.d/anacron or its systemd unit).





            share|improve this answer




















            • I've seen the a,b,c notation around; can I use that in my shell? (I don't have access to it right now or I'd test.) Does it mean what it seems to -- that is, all files with the ... replaced with any of the comma-separated things?
              – Nic Hartley
              Dec 15 '17 at 22:11






            • 3




              @QPaysTaxes - Bash (and a few other shells) expands braces in that way - see Bash Reference Manual: Brace Expansion
              – shalomb
              Dec 15 '17 at 22:14














            up vote
            17
            down vote



            accepted










            It uses a variety of methods to run:



            • if the system is running systemd, it uses a systemd timer (in the Debian package, you’ll see it in /lib/systemd/system/anacron.timer);

            • if the system isn’t running systemd, it uses a system cron job (in /etc/cron.d/anacron);

            • in all cases it runs daily, weekly and monthly cron jobs (in /etc/cron.daily,weekly,monthly/0anacron);

            • it also runs at boot (from /etc/init.d/anacron or its systemd unit).





            share|improve this answer




















            • I've seen the a,b,c notation around; can I use that in my shell? (I don't have access to it right now or I'd test.) Does it mean what it seems to -- that is, all files with the ... replaced with any of the comma-separated things?
              – Nic Hartley
              Dec 15 '17 at 22:11






            • 3




              @QPaysTaxes - Bash (and a few other shells) expands braces in that way - see Bash Reference Manual: Brace Expansion
              – shalomb
              Dec 15 '17 at 22:14












            up vote
            17
            down vote



            accepted







            up vote
            17
            down vote



            accepted






            It uses a variety of methods to run:



            • if the system is running systemd, it uses a systemd timer (in the Debian package, you’ll see it in /lib/systemd/system/anacron.timer);

            • if the system isn’t running systemd, it uses a system cron job (in /etc/cron.d/anacron);

            • in all cases it runs daily, weekly and monthly cron jobs (in /etc/cron.daily,weekly,monthly/0anacron);

            • it also runs at boot (from /etc/init.d/anacron or its systemd unit).





            share|improve this answer












            It uses a variety of methods to run:



            • if the system is running systemd, it uses a systemd timer (in the Debian package, you’ll see it in /lib/systemd/system/anacron.timer);

            • if the system isn’t running systemd, it uses a system cron job (in /etc/cron.d/anacron);

            • in all cases it runs daily, weekly and monthly cron jobs (in /etc/cron.daily,weekly,monthly/0anacron);

            • it also runs at boot (from /etc/init.d/anacron or its systemd unit).






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 15 '17 at 13:00









            Stephen Kitt

            143k22309372




            143k22309372











            • I've seen the a,b,c notation around; can I use that in my shell? (I don't have access to it right now or I'd test.) Does it mean what it seems to -- that is, all files with the ... replaced with any of the comma-separated things?
              – Nic Hartley
              Dec 15 '17 at 22:11






            • 3




              @QPaysTaxes - Bash (and a few other shells) expands braces in that way - see Bash Reference Manual: Brace Expansion
              – shalomb
              Dec 15 '17 at 22:14
















            • I've seen the a,b,c notation around; can I use that in my shell? (I don't have access to it right now or I'd test.) Does it mean what it seems to -- that is, all files with the ... replaced with any of the comma-separated things?
              – Nic Hartley
              Dec 15 '17 at 22:11






            • 3




              @QPaysTaxes - Bash (and a few other shells) expands braces in that way - see Bash Reference Manual: Brace Expansion
              – shalomb
              Dec 15 '17 at 22:14















            I've seen the a,b,c notation around; can I use that in my shell? (I don't have access to it right now or I'd test.) Does it mean what it seems to -- that is, all files with the ... replaced with any of the comma-separated things?
            – Nic Hartley
            Dec 15 '17 at 22:11




            I've seen the a,b,c notation around; can I use that in my shell? (I don't have access to it right now or I'd test.) Does it mean what it seems to -- that is, all files with the ... replaced with any of the comma-separated things?
            – Nic Hartley
            Dec 15 '17 at 22:11




            3




            3




            @QPaysTaxes - Bash (and a few other shells) expands braces in that way - see Bash Reference Manual: Brace Expansion
            – shalomb
            Dec 15 '17 at 22:14




            @QPaysTaxes - Bash (and a few other shells) expands braces in that way - see Bash Reference Manual: Brace Expansion
            – shalomb
            Dec 15 '17 at 22:14












            up vote
            5
            down vote













            anacron is not a daemon, and therefore it needs to be run periodically by other means. Most often, this means executing it with a cron job once a day, and possibly on bootup as well.



            This may look like the following in root's crontab, for example:



            @reboot /usr/local/sbin/anacron -ds
            @daily /usr/local/sbin/anacron -ds


            Linux systems that uses systemd may do this differently, obviously, but still need to facilitate at least one run of anacron per 24 hour period.



            Running anacron more than once every 24 hours is pointless as the shortest period one can schedule jobs through anacron is once a day.






            share|improve this answer


























              up vote
              5
              down vote













              anacron is not a daemon, and therefore it needs to be run periodically by other means. Most often, this means executing it with a cron job once a day, and possibly on bootup as well.



              This may look like the following in root's crontab, for example:



              @reboot /usr/local/sbin/anacron -ds
              @daily /usr/local/sbin/anacron -ds


              Linux systems that uses systemd may do this differently, obviously, but still need to facilitate at least one run of anacron per 24 hour period.



              Running anacron more than once every 24 hours is pointless as the shortest period one can schedule jobs through anacron is once a day.






              share|improve this answer
























                up vote
                5
                down vote










                up vote
                5
                down vote









                anacron is not a daemon, and therefore it needs to be run periodically by other means. Most often, this means executing it with a cron job once a day, and possibly on bootup as well.



                This may look like the following in root's crontab, for example:



                @reboot /usr/local/sbin/anacron -ds
                @daily /usr/local/sbin/anacron -ds


                Linux systems that uses systemd may do this differently, obviously, but still need to facilitate at least one run of anacron per 24 hour period.



                Running anacron more than once every 24 hours is pointless as the shortest period one can schedule jobs through anacron is once a day.






                share|improve this answer














                anacron is not a daemon, and therefore it needs to be run periodically by other means. Most often, this means executing it with a cron job once a day, and possibly on bootup as well.



                This may look like the following in root's crontab, for example:



                @reboot /usr/local/sbin/anacron -ds
                @daily /usr/local/sbin/anacron -ds


                Linux systems that uses systemd may do this differently, obviously, but still need to facilitate at least one run of anacron per 24 hour period.



                Running anacron more than once every 24 hours is pointless as the shortest period one can schedule jobs through anacron is once a day.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 8 at 19:02

























                answered Dec 15 '17 at 13:19









                Kusalananda

                104k14206324




                104k14206324






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f411051%2fhow-does-anacron-work-if-its-not-a-daemon%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay