Network restart script does not complete as a cronjob I have this simple script on crontab (root): (centos 6.5)  if ! ping -c 1 172.20.1.1; then echo "NOT OK" &gt;&gt; /root/log ifconfig eth3 down sleep 5 ifconfig eth3 up else echo OK &gt;&gt; /root/log fi   The script works fine if I run it from directly from terminal and restarts the interfaces but not when run through crontab. I wanted to see if the crontab is actually running as expected and put the echo lines and I'm 100% sure the script is running because I see the OK and NOT OK lines on the log.   What do you think is wrong with this?
Why is my crontab not working, and how can I troubleshoot it? This is a  about using cron &amp; crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.
How should ambiguous tags be dealt with? Paper status changed to “Decision in Process” rapidly after initial submission Can I travel to Germany from a country different from the one I got the visa from? Plotting complex numbers as an Argand Diagram How do I run executable scripts in Nautilus? When I double-click on a script in Nautilus to run it, the script just opens in my text editor with no option to run it. Using Nautilus, how do I run executable text files and/or scripts? I'm cooking two different dishes in the oven at the same time that each require different temperatures. One is a roasted vegetable dish that says to cook at 475 for 35-40 minutes and the other is parmesan crusted pork chops at 350 for 40-45 minutes. What do you suggest I do? Making overview with linked detailed maps in QGIS? getOnClickListener() in Android views Does $\lim_{z\rightarrow0}\frac{\bar{z}^2}{z^2}$ exist? How can I specify a custom date formate to be validated with the  for jQuery? What is the norm of this bounded linear functional? Let $a$, $b$ be two arbitrary but fixed real numbers such that $a &lt; b$, let $C[a,b]$ denote the normed space of all continuous real (or complex) valued functions defined on $[a,b]$ with the maximum norm, and let $f$ be the functional defined on $C[a,b]$ as $$f(x):= \int_{a}^{b} x(t) x_0(t) dt $$ for all $x$ in $C[a,b]$, where $x_0$ is a fixed element of $C[a,b]$.   Now $f$ is evidently linear and bounded. How to compute the norm of $f$? What is this norm?   And what is the norm of the bounded linear functional $g$ defined as follows: $$g(x):= \int_{a}^{(a+b)/2} x(t) \cdot dt - \int_{(a+b)/2}^{b} x(t) \cdot dt$$ for all $x$ in $C[a,b]$? I have a question about calculating the degree of a finite field extension over $\mathbb{Q}$.  This is problem 18 in chapter 1 of Patrick Morandi's Field and Galois Theory. The problem asked to show that $$ \left[ \mathbb{Q}{ \left( \sqrt[4]{2},\sqrt{3} \right):\mathbb{Q} }\right] =8 $$ Here's my work : First, we have $$  \left[ \mathbb{Q} ( \sqrt[4]{2},\sqrt{3}):\mathbb{Q}\right] = \left[ \mathbb{Q}(\sqrt[4]{2},\sqrt{3}) : \mathbb{Q}({\sqrt[4]{2}}) \right] . \left[ \mathbb{Q}{(\sqrt[4]{2})}: \mathbb{Q} \right]$$ It's easy to show that $\left[ \mathbb{Q}{(\sqrt[4]{2})}: \mathbb{Q} \right] =4 $ because the minimal polynomial of $\sqrt[4]{2}$ over $\mathbb{Q}$ is $x^4 -2$. Next, I'm going to show that  $$ \left[ \mathbb{Q}(\sqrt[4]{2},\sqrt{3}) : \mathbb{Q}({\sqrt[4]{2}}) \right] =2$$ Consider the polynomial $f(x) = x^2 -3$. It's monic and $\sqrt{3}$ is a root of $f$, but I'm stuck in proving $\sqrt{3} \notin \mathbb{Q}(\sqrt[4]{2})$ (hence $f$ is irreducible over $\mathbb{Q}(\sqrt[4]{2}))$.  My question is: Is there any proof to show that $\sqrt{3} \notin \mathbb{Q}(\sqrt[4]{2})$ or another way to caculate the degree of this field extension?  Thank you for your help. Can helium disappear from Earth? Helium is lighter than air, so it should fly off from Earth. Is it possible that in the future we will run out helium? Is there a simple command for the available height in a beamer slide? Should 'Hi', 'thanks', taglines, and salutations be removed from posts? How can I fix a mistake I made on my income tax filing? [US] How can I fix a mistake I made on my income tax filing? Showing that a function is not differentiable "This one is" OR "This is" I have seen people using "This one is Daddy's" with the word "one" before a form of the verb be. I am confused about which is more accurate, to use:     This is Daddy's.   or     This one is Daddy's.   Hope you can address my concerns, thank you. Conservation Of Angular Momentum of a falling stone I am currently stuck on the following question.   A stone is dropped from a stationary helicopter 500m above the ground, at the equator. How far from the point vertically below the helicopter does it land and in what direction? Solve this problem by conserving angular momentum.   My current interpretation is that when the stone falls in order to converse angular momentum the angular velocity must increase. This leads to the stone travelling to the east.   I equated the angular momentum at the start       L0=*(re+h)mVo  where re is radius of earth, h is the height above that, m is mass and Vo is inital velocity. To the angular momentum at any time  L=(re+h-1/2gt^2)m(Ve+Vo)  where the 1/2at^2 term comes from gravitational acceleration and Ve is the additional velocity.   I rearranged to find Ve and then integrated over the time it takes to fall the 500m in order to work out the extra distance the stone traveled. However, my answer is 1/2 what the answer should be. I have checked the maths and it seems to be fine. So I believe my set up is wrong. Any help would be appreciated. Prove that $\prod_{k=1}^{n-1}\sin\frac{k \pi}{n} = \frac{n}{2^{n-1}}$ Using $\text{n}^{\text{th}}$ root of unity  $$\large\left(e^{\frac{2ki\pi}{n}}\right)^{n} = 1$$  Prove that   $$\prod_{k=1}^{n-1}\sin\frac{k \pi}{n} = \frac{n}{2^{n-1}}$$