How can I run a job every 2 minutes through crontab in Linux? [duplicate]

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





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








-6
















This question already has an answer here:



  • Create cron jobs to repeat every X units of time starting on an arbitary unit

    3 answers



How can I run a job every 2 minutes through crontab in Linux?










share|improve this question















marked as duplicate by Jeff Schaller, ilkkachu, Mr Shunz, Jaroslav Kucera, Shadur Mar 18 at 19:38


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
























    -6
















    This question already has an answer here:



    • Create cron jobs to repeat every X units of time starting on an arbitary unit

      3 answers



    How can I run a job every 2 minutes through crontab in Linux?










    share|improve this question















    marked as duplicate by Jeff Schaller, ilkkachu, Mr Shunz, Jaroslav Kucera, Shadur Mar 18 at 19:38


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.




















      -6












      -6








      -6









      This question already has an answer here:



      • Create cron jobs to repeat every X units of time starting on an arbitary unit

        3 answers



      How can I run a job every 2 minutes through crontab in Linux?










      share|improve this question

















      This question already has an answer here:



      • Create cron jobs to repeat every X units of time starting on an arbitary unit

        3 answers



      How can I run a job every 2 minutes through crontab in Linux?





      This question already has an answer here:



      • Create cron jobs to repeat every X units of time starting on an arbitary unit

        3 answers







      cron






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 18 at 6:46









      RalfFriedl

      5,44531125




      5,44531125










      asked Mar 18 at 6:36









      user342290user342290

      1




      1




      marked as duplicate by Jeff Schaller, ilkkachu, Mr Shunz, Jaroslav Kucera, Shadur Mar 18 at 19:38


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









      marked as duplicate by Jeff Schaller, ilkkachu, Mr Shunz, Jaroslav Kucera, Shadur Mar 18 at 19:38


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






















          1 Answer
          1






          active

          oldest

          votes


















          3














          The crontab format is described in section 5 (file formats) of the manual. With most man implementations for Linux, you do:



          man 5 crontab


          to read it (on some systems, you need man -s 5 man instead). man crontab would give you the manual of the crontab command (in section 1 of the manual). See man man for more information.



          While historically, you'd have needed:



          0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * /path/to/script


          (every 2 minutes starting at 00:00:00)



          or



          1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59 * * * * /path/to/script


          (every 2 minutes starting at 00:01:00)



          With modern cron implementations (including the ones typically found on Linux distributions), you can simplify it to:



          */2 * * * * /path/to/script
          1-59/2 * * * * /path/to/script


          If you want to run it every 2 minutes starting at 00:00:34, you can always write it:



          */2 * * * * sleep 34; /path/to/script





          share|improve this answer





























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            The crontab format is described in section 5 (file formats) of the manual. With most man implementations for Linux, you do:



            man 5 crontab


            to read it (on some systems, you need man -s 5 man instead). man crontab would give you the manual of the crontab command (in section 1 of the manual). See man man for more information.



            While historically, you'd have needed:



            0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * /path/to/script


            (every 2 minutes starting at 00:00:00)



            or



            1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59 * * * * /path/to/script


            (every 2 minutes starting at 00:01:00)



            With modern cron implementations (including the ones typically found on Linux distributions), you can simplify it to:



            */2 * * * * /path/to/script
            1-59/2 * * * * /path/to/script


            If you want to run it every 2 minutes starting at 00:00:34, you can always write it:



            */2 * * * * sleep 34; /path/to/script





            share|improve this answer



























              3














              The crontab format is described in section 5 (file formats) of the manual. With most man implementations for Linux, you do:



              man 5 crontab


              to read it (on some systems, you need man -s 5 man instead). man crontab would give you the manual of the crontab command (in section 1 of the manual). See man man for more information.



              While historically, you'd have needed:



              0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * /path/to/script


              (every 2 minutes starting at 00:00:00)



              or



              1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59 * * * * /path/to/script


              (every 2 minutes starting at 00:01:00)



              With modern cron implementations (including the ones typically found on Linux distributions), you can simplify it to:



              */2 * * * * /path/to/script
              1-59/2 * * * * /path/to/script


              If you want to run it every 2 minutes starting at 00:00:34, you can always write it:



              */2 * * * * sleep 34; /path/to/script





              share|improve this answer

























                3












                3








                3







                The crontab format is described in section 5 (file formats) of the manual. With most man implementations for Linux, you do:



                man 5 crontab


                to read it (on some systems, you need man -s 5 man instead). man crontab would give you the manual of the crontab command (in section 1 of the manual). See man man for more information.



                While historically, you'd have needed:



                0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * /path/to/script


                (every 2 minutes starting at 00:00:00)



                or



                1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59 * * * * /path/to/script


                (every 2 minutes starting at 00:01:00)



                With modern cron implementations (including the ones typically found on Linux distributions), you can simplify it to:



                */2 * * * * /path/to/script
                1-59/2 * * * * /path/to/script


                If you want to run it every 2 minutes starting at 00:00:34, you can always write it:



                */2 * * * * sleep 34; /path/to/script





                share|improve this answer













                The crontab format is described in section 5 (file formats) of the manual. With most man implementations for Linux, you do:



                man 5 crontab


                to read it (on some systems, you need man -s 5 man instead). man crontab would give you the manual of the crontab command (in section 1 of the manual). See man man for more information.



                While historically, you'd have needed:



                0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * /path/to/script


                (every 2 minutes starting at 00:00:00)



                or



                1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59 * * * * /path/to/script


                (every 2 minutes starting at 00:01:00)



                With modern cron implementations (including the ones typically found on Linux distributions), you can simplify it to:



                */2 * * * * /path/to/script
                1-59/2 * * * * /path/to/script


                If you want to run it every 2 minutes starting at 00:00:34, you can always write it:



                */2 * * * * sleep 34; /path/to/script






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 18 at 7:24









                Stéphane ChazelasStéphane Chazelas

                314k57597955




                314k57597955












                    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