How to start & enable crontab in ubuntu 16












1















I have aws image that I have created using ubuntu 16. Where I have cronjob running, I want to make sure that when I start new machine using this image, it (cronjobs) still run new machine.



when I tried following commands



1:



systemctl enable crond.service


I got following errors:



Failed to execute operation: No such file or directory


2:



systemctl status crond.service


I got following error:



● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)


3:



service crond status


I got following error:



● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)









share|improve this question


















  • 1





    AFAIK it's cron.service not crond.service

    – steeldriver
    Jul 25 '17 at 16:41
















1















I have aws image that I have created using ubuntu 16. Where I have cronjob running, I want to make sure that when I start new machine using this image, it (cronjobs) still run new machine.



when I tried following commands



1:



systemctl enable crond.service


I got following errors:



Failed to execute operation: No such file or directory


2:



systemctl status crond.service


I got following error:



● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)


3:



service crond status


I got following error:



● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)









share|improve this question


















  • 1





    AFAIK it's cron.service not crond.service

    – steeldriver
    Jul 25 '17 at 16:41














1












1








1








I have aws image that I have created using ubuntu 16. Where I have cronjob running, I want to make sure that when I start new machine using this image, it (cronjobs) still run new machine.



when I tried following commands



1:



systemctl enable crond.service


I got following errors:



Failed to execute operation: No such file or directory


2:



systemctl status crond.service


I got following error:



● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)


3:



service crond status


I got following error:



● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)









share|improve this question














I have aws image that I have created using ubuntu 16. Where I have cronjob running, I want to make sure that when I start new machine using this image, it (cronjobs) still run new machine.



when I tried following commands



1:



systemctl enable crond.service


I got following errors:



Failed to execute operation: No such file or directory


2:



systemctl status crond.service


I got following error:



● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)


3:



service crond status


I got following error:



● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)






cron






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jul 25 '17 at 16:12









Kppatel PatelKppatel Patel

11126




11126








  • 1





    AFAIK it's cron.service not crond.service

    – steeldriver
    Jul 25 '17 at 16:41














  • 1





    AFAIK it's cron.service not crond.service

    – steeldriver
    Jul 25 '17 at 16:41








1




1





AFAIK it's cron.service not crond.service

– steeldriver
Jul 25 '17 at 16:41





AFAIK it's cron.service not crond.service

– steeldriver
Jul 25 '17 at 16:41










2 Answers
2






active

oldest

votes


















1














As @steeldriver mentioned it is cron.service not crond.service difference with systemd. Anyways you can edit your cronjobs through crontab -ejust follow the instructions for setting the time for each cronjob at the bottom. And when you're done simply save the file and it should say "installing new cronjob", then voila it will magically execute the script at the given time.






share|improve this answer































    1














    4 ways to check status of cron service in Ubuntu:



    ps -ef | grep cron

    systemctl status cron.service

    service cron status

    /etc/init.d/cron status





    share|improve this answer








    New contributor




    cuimingda 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: "89"
      };
      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',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      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%2faskubuntu.com%2fquestions%2f939649%2fhow-to-start-enable-crontab-in-ubuntu-16%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      As @steeldriver mentioned it is cron.service not crond.service difference with systemd. Anyways you can edit your cronjobs through crontab -ejust follow the instructions for setting the time for each cronjob at the bottom. And when you're done simply save the file and it should say "installing new cronjob", then voila it will magically execute the script at the given time.






      share|improve this answer




























        1














        As @steeldriver mentioned it is cron.service not crond.service difference with systemd. Anyways you can edit your cronjobs through crontab -ejust follow the instructions for setting the time for each cronjob at the bottom. And when you're done simply save the file and it should say "installing new cronjob", then voila it will magically execute the script at the given time.






        share|improve this answer


























          1












          1








          1







          As @steeldriver mentioned it is cron.service not crond.service difference with systemd. Anyways you can edit your cronjobs through crontab -ejust follow the instructions for setting the time for each cronjob at the bottom. And when you're done simply save the file and it should say "installing new cronjob", then voila it will magically execute the script at the given time.






          share|improve this answer













          As @steeldriver mentioned it is cron.service not crond.service difference with systemd. Anyways you can edit your cronjobs through crontab -ejust follow the instructions for setting the time for each cronjob at the bottom. And when you're done simply save the file and it should say "installing new cronjob", then voila it will magically execute the script at the given time.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 25 '17 at 17:08









          NerdOfCodeNerdOfCode

          1,105524




          1,105524

























              1














              4 ways to check status of cron service in Ubuntu:



              ps -ef | grep cron

              systemctl status cron.service

              service cron status

              /etc/init.d/cron status





              share|improve this answer








              New contributor




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

























                1














                4 ways to check status of cron service in Ubuntu:



                ps -ef | grep cron

                systemctl status cron.service

                service cron status

                /etc/init.d/cron status





                share|improve this answer








                New contributor




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























                  1












                  1








                  1







                  4 ways to check status of cron service in Ubuntu:



                  ps -ef | grep cron

                  systemctl status cron.service

                  service cron status

                  /etc/init.d/cron status





                  share|improve this answer








                  New contributor




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










                  4 ways to check status of cron service in Ubuntu:



                  ps -ef | grep cron

                  systemctl status cron.service

                  service cron status

                  /etc/init.d/cron status






                  share|improve this answer








                  New contributor




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









                  share|improve this answer



                  share|improve this answer






                  New contributor




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









                  answered Mar 9 at 11:45









                  cuimingdacuimingda

                  112




                  112




                  New contributor




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





                  New contributor





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






                  cuimingda 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




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • 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%2faskubuntu.com%2fquestions%2f939649%2fhow-to-start-enable-crontab-in-ubuntu-16%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

                      How did Captain America manage to do this?

                      迪纳利

                      南乌拉尔铁路局