Rebooting Ubuntu on a specific criteria in cronRunning a cron job manually and immediatelyHow to check cron...

Can I cause damage to electrical appliances by unplugging them when they are turned on?

Taxes on Dividends in a Roth IRA

What fields between the rationals and the reals allow a good notion of 2D distance?

Why do Radio Buttons not fill the entire outer circle?

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

Shouldn’t conservatives embrace universal basic income?

Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?

The IT department bottlenecks progress, how should I handle this?

Microchip documentation does not label CAN buss pins on micro controller pinout diagram

Why do ¬, ∀ and ∃ have the same precedence?

Delete multiple columns using awk or sed

How could a planet have erratic days?

What is the difference between lands and mana?

Make a Bowl of Alphabet Soup

What is going on with gets(stdin) on the site coderbyte?

When were female captains banned from Starfleet?

Is there a nicer/politer/more positive alternative for "negates"?

A variation to the phrase "hanging over my shoulders"

Why should universal income be universal?

Why can't the Brexit deadlock in the UK parliament be solved with a plurality vote?

Is there a way to have vectors outlined in a Vector Plot?

How to convince somebody that he is fit for something else, but not this job?

15% tax on $7.5k earnings. Is that right?

How to preserve electronics (computers, iPads and phones) for hundreds of years



Rebooting Ubuntu on a specific criteria in cron


Running a cron job manually and immediatelyHow to check cron logs in UbuntuDoes Ubuntu-stock ldirectord not handle hung connections to real servers or am I configuring it wrong?Running a Cron on Ubuntu Servercron job failing silentlyWhy is this cron job with shell script failing?installing Percona XtraDB Cluster on Ubuntu 13.04cron not running specific commandhow to get rid of awstat www-data daemon?ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)













0















I created a cron entry that will check if a wordpress database is up and will reboot itself if it is not. Note that it's a temporary solution to reboot the server and just wondering what is wrong with my entry.




*/5 * * * * root curl -sS https://example.com | grep "Error establishing a database connection"; [ $? -eq 0 ] && /sbin/shutdown -r now










share







New contributor




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

























    0















    I created a cron entry that will check if a wordpress database is up and will reboot itself if it is not. Note that it's a temporary solution to reboot the server and just wondering what is wrong with my entry.




    */5 * * * * root curl -sS https://example.com | grep "Error establishing a database connection"; [ $? -eq 0 ] && /sbin/shutdown -r now










    share







    New contributor




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























      0












      0








      0








      I created a cron entry that will check if a wordpress database is up and will reboot itself if it is not. Note that it's a temporary solution to reboot the server and just wondering what is wrong with my entry.




      */5 * * * * root curl -sS https://example.com | grep "Error establishing a database connection"; [ $? -eq 0 ] && /sbin/shutdown -r now










      share







      New contributor




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












      I created a cron entry that will check if a wordpress database is up and will reboot itself if it is not. Note that it's a temporary solution to reboot the server and just wondering what is wrong with my entry.




      */5 * * * * root curl -sS https://example.com | grep "Error establishing a database connection"; [ $? -eq 0 ] && /sbin/shutdown -r now








      ubuntu cron ubuntu-18.04





      share







      New contributor




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










      share







      New contributor




      sudoerj 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




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









      asked 4 mins ago









      sudoerjsudoerj

      1




      1




      New contributor




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





      New contributor





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






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






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "2"
          };
          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
          });


          }
          });






          sudoerj is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f959447%2frebooting-ubuntu-on-a-specific-criteria-in-cron%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          sudoerj is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          sudoerj is a new contributor. Be nice, and check out our Code of Conduct.













          sudoerj is a new contributor. Be nice, and check out our Code of Conduct.












          sudoerj is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Server Fault!


          • 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%2fserverfault.com%2fquestions%2f959447%2frebooting-ubuntu-on-a-specific-criteria-in-cron%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

          As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

          Список ссавців Італії Природоохоронні статуси | Список |...

          Українські прізвища Зміст Історичні відомості |...