Remove all `at` jobs

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











up vote
26
down vote

favorite
5












I know that to remove a scheduled at job I have to use atrm "numjob1 numjob2", but is there an easy way to do that for all the jobs?










share|improve this question



























    up vote
    26
    down vote

    favorite
    5












    I know that to remove a scheduled at job I have to use atrm "numjob1 numjob2", but is there an easy way to do that for all the jobs?










    share|improve this question

























      up vote
      26
      down vote

      favorite
      5









      up vote
      26
      down vote

      favorite
      5






      5





      I know that to remove a scheduled at job I have to use atrm "numjob1 numjob2", but is there an easy way to do that for all the jobs?










      share|improve this question















      I know that to remove a scheduled at job I have to use atrm "numjob1 numjob2", but is there an easy way to do that for all the jobs?







      command-line at






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 25 '16 at 11:09









      Jeff Schaller

      34.2k951113




      34.2k951113










      asked Oct 28 '12 at 20:20









      robob

      233135




      233135




















          5 Answers
          5






          active

          oldest

          votes

















          up vote
          27
          down vote



          accepted










          You can run this command to remove all the jobs at the atq



           for i in `atq | awk 'print $1'`;do atrm $i;done





          share|improve this answer
















          • 1




            variation on this answer at -l | awk 'printf "%s ", $1' | xargs atrm
            – Sergiy Kolodyazhnyy
            Apr 24 '15 at 10:11

















          up vote
          10
          down vote













          You could do something like this:



          for i in $(atq | cut -f 1); do atrm $i; done





          share|improve this answer




















          • In FreeBSD it's cut -f3 First column is date
            – David Jashi
            Oct 26 '14 at 9:51

















          up vote
          5
          down vote













          This seems to me a short line:



          atrm $(atq | cut -f1)





          share|improve this answer





























            up vote
            2
            down vote













            For more AIX 6 systems you can simply do:



            atrm -


            Ref: http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.cmds%2Fdoc%2Faixcmds1%2Fatrm.htm






            share|improve this answer



























              up vote
              0
              down vote













              Here is my xargs version that avoids braces and is hopefully intuitive:



              atq | cut -f 1 | xargs atrm


              You can also grep specific jobs by timestamp/userid and then remove them:



              atq | grep "2018-10-22 16:" | cut -f 1 | xargs atrm




              share








              New contributor




              Thyag is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.

















                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%2f53144%2fremove-all-at-jobs%23new-answer', 'question_page');

                );

                Post as a guest






























                5 Answers
                5






                active

                oldest

                votes








                5 Answers
                5






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes








                up vote
                27
                down vote



                accepted










                You can run this command to remove all the jobs at the atq



                 for i in `atq | awk 'print $1'`;do atrm $i;done





                share|improve this answer
















                • 1




                  variation on this answer at -l | awk 'printf "%s ", $1' | xargs atrm
                  – Sergiy Kolodyazhnyy
                  Apr 24 '15 at 10:11














                up vote
                27
                down vote



                accepted










                You can run this command to remove all the jobs at the atq



                 for i in `atq | awk 'print $1'`;do atrm $i;done





                share|improve this answer
















                • 1




                  variation on this answer at -l | awk 'printf "%s ", $1' | xargs atrm
                  – Sergiy Kolodyazhnyy
                  Apr 24 '15 at 10:11












                up vote
                27
                down vote



                accepted







                up vote
                27
                down vote



                accepted






                You can run this command to remove all the jobs at the atq



                 for i in `atq | awk 'print $1'`;do atrm $i;done





                share|improve this answer












                You can run this command to remove all the jobs at the atq



                 for i in `atq | awk 'print $1'`;do atrm $i;done






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Oct 28 '12 at 20:34









                pradeepchhetri

                6,11583254




                6,11583254







                • 1




                  variation on this answer at -l | awk 'printf "%s ", $1' | xargs atrm
                  – Sergiy Kolodyazhnyy
                  Apr 24 '15 at 10:11












                • 1




                  variation on this answer at -l | awk 'printf "%s ", $1' | xargs atrm
                  – Sergiy Kolodyazhnyy
                  Apr 24 '15 at 10:11







                1




                1




                variation on this answer at -l | awk 'printf "%s ", $1' | xargs atrm
                – Sergiy Kolodyazhnyy
                Apr 24 '15 at 10:11




                variation on this answer at -l | awk 'printf "%s ", $1' | xargs atrm
                – Sergiy Kolodyazhnyy
                Apr 24 '15 at 10:11












                up vote
                10
                down vote













                You could do something like this:



                for i in $(atq | cut -f 1); do atrm $i; done





                share|improve this answer




















                • In FreeBSD it's cut -f3 First column is date
                  – David Jashi
                  Oct 26 '14 at 9:51














                up vote
                10
                down vote













                You could do something like this:



                for i in $(atq | cut -f 1); do atrm $i; done





                share|improve this answer




















                • In FreeBSD it's cut -f3 First column is date
                  – David Jashi
                  Oct 26 '14 at 9:51












                up vote
                10
                down vote










                up vote
                10
                down vote









                You could do something like this:



                for i in $(atq | cut -f 1); do atrm $i; done





                share|improve this answer












                You could do something like this:



                for i in $(atq | cut -f 1); do atrm $i; done






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Oct 28 '12 at 20:29









                DaveEmme

                346125




                346125











                • In FreeBSD it's cut -f3 First column is date
                  – David Jashi
                  Oct 26 '14 at 9:51
















                • In FreeBSD it's cut -f3 First column is date
                  – David Jashi
                  Oct 26 '14 at 9:51















                In FreeBSD it's cut -f3 First column is date
                – David Jashi
                Oct 26 '14 at 9:51




                In FreeBSD it's cut -f3 First column is date
                – David Jashi
                Oct 26 '14 at 9:51










                up vote
                5
                down vote













                This seems to me a short line:



                atrm $(atq | cut -f1)





                share|improve this answer


























                  up vote
                  5
                  down vote













                  This seems to me a short line:



                  atrm $(atq | cut -f1)





                  share|improve this answer
























                    up vote
                    5
                    down vote










                    up vote
                    5
                    down vote









                    This seems to me a short line:



                    atrm $(atq | cut -f1)





                    share|improve this answer














                    This seems to me a short line:



                    atrm $(atq | cut -f1)






                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Jul 28 '14 at 19:50









                    Networker

                    5,83993867




                    5,83993867










                    answered Jul 28 '14 at 19:19









                    user78969

                    5111




                    5111




















                        up vote
                        2
                        down vote













                        For more AIX 6 systems you can simply do:



                        atrm -


                        Ref: http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.cmds%2Fdoc%2Faixcmds1%2Fatrm.htm






                        share|improve this answer
























                          up vote
                          2
                          down vote













                          For more AIX 6 systems you can simply do:



                          atrm -


                          Ref: http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.cmds%2Fdoc%2Faixcmds1%2Fatrm.htm






                          share|improve this answer






















                            up vote
                            2
                            down vote










                            up vote
                            2
                            down vote









                            For more AIX 6 systems you can simply do:



                            atrm -


                            Ref: http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.cmds%2Fdoc%2Faixcmds1%2Fatrm.htm






                            share|improve this answer












                            For more AIX 6 systems you can simply do:



                            atrm -


                            Ref: http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.cmds%2Fdoc%2Faixcmds1%2Fatrm.htm







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Sep 3 '13 at 2:35









                            Craig

                            1213




                            1213




















                                up vote
                                0
                                down vote













                                Here is my xargs version that avoids braces and is hopefully intuitive:



                                atq | cut -f 1 | xargs atrm


                                You can also grep specific jobs by timestamp/userid and then remove them:



                                atq | grep "2018-10-22 16:" | cut -f 1 | xargs atrm




                                share








                                New contributor




                                Thyag is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.





















                                  up vote
                                  0
                                  down vote













                                  Here is my xargs version that avoids braces and is hopefully intuitive:



                                  atq | cut -f 1 | xargs atrm


                                  You can also grep specific jobs by timestamp/userid and then remove them:



                                  atq | grep "2018-10-22 16:" | cut -f 1 | xargs atrm




                                  share








                                  New contributor




                                  Thyag is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                  Check out our Code of Conduct.



















                                    up vote
                                    0
                                    down vote










                                    up vote
                                    0
                                    down vote









                                    Here is my xargs version that avoids braces and is hopefully intuitive:



                                    atq | cut -f 1 | xargs atrm


                                    You can also grep specific jobs by timestamp/userid and then remove them:



                                    atq | grep "2018-10-22 16:" | cut -f 1 | xargs atrm




                                    share








                                    New contributor




                                    Thyag is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.









                                    Here is my xargs version that avoids braces and is hopefully intuitive:



                                    atq | cut -f 1 | xargs atrm


                                    You can also grep specific jobs by timestamp/userid and then remove them:



                                    atq | grep "2018-10-22 16:" | cut -f 1 | xargs atrm





                                    share








                                    New contributor




                                    Thyag is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.








                                    share


                                    share






                                    New contributor




                                    Thyag is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.









                                    answered 7 mins ago









                                    Thyag

                                    1012




                                    1012




                                    New contributor




                                    Thyag is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.





                                    New contributor





                                    Thyag is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.






                                    Thyag is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.



























                                         

                                        draft saved


                                        draft discarded















































                                         


                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f53144%2fremove-all-at-jobs%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