Cronjob unable to restart apache in CentOS 6 I'm using Plesk 12 + CentOS 6.  I ssh into root account and use crontab -e to create the following entry:  * * * * * service httpd restart  I expect it to restart apache every minute (just to test/debug it's working)  I checked the apache status using service httpd status and the PID is always the same, and apache is not restarting.  I verified /var/log/cron that the command is being executed.  Feb  7 16:11:01 srv104 CROND[15620]: (root) CMD (service httpd restart)  However, all other entries in the crontab are correctly executing.  If I execute the command service httpd restart manually in shell terminal, apache is restarting correctly with a new updated PID.  Is there any preventive measure in place such that service can't be executed in root cronjob?     has some useful tips, but does not address my specific situation mentioned in the original question above.  Working Solution:  If I specify the full path to the /sbin/service, eg. /sbin/service httpd restart in the cronjob, as mentioned in the accepted answer, it does work.  Not sure if it's operating system version related, but simply with the PATH in place in /etc/crontab/ does not help in my situation.
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.
Why are there two sets of the Ctrl, Alt, and Shift modifier keys when only one of each is necessary? Moment of inertia of a cylinder about its base I've tried to find the moment of inertia of a cylinder rotating about an axis parallel to its base (i.e about the 'End diameter') as one can see  . But when I checked my results with different references ,I've found that it's incorrect!.I need a help to figure out where I did it wrong. since $$I=\int\limits x^2.dm$$ $$dm = \rho.dv$$ where $$dv= r.d\theta . dr .dh$$ &amp; $$\rho=\frac{M}{\pi R^2 H}$$ $M$:cylinder total mass. $H$:total height of cylinder. $R$:the radius of the cylinder. The distance of each infinitesimal element from the axis of rotation would be : $$\sqrt{r^2+h^2}$$ Therfore, $$I= \frac{2M}{ R^2 H}\int\limits_{0}^{R} \int\limits_{0}^{H}\, r(r^2+h^2)dh\,dr$$ and this gives a result of : $$\frac{M~H^2}{3}+\frac{M~R^2}{2}$$ Which is obviously wrong since the second term should be multiplied by a factor of $1/2$. How to make a circle with grid on the outside ring I made something like this:    I did this with the Ellipse Tool and the Line Tool.  Now the circle is accurate, but the lines inside are very inaccurate. Is there another tool that does the same thing but with a lot more accuracy? I have a set of coordinate points. The points are distributed in such a way that some points are clustered around a specific area. There is an option to find out mean coordinates(s) of the whole point layer. I would like to know if there is any way in QGIS to find out the mean coordinates of the points from a specific area from a point layer. How to execute a Matlab script from C++ I'm at a loss with “Dungeons and Dragons.” How does one play it, anyway? I'm no gamer at all, so this could be like a very silly, basic question for you guys. The thing is that I always read about "Dungeons and Dragons" game (not the video game, but the normal game to play with friends that are actually gathered together). And I would like to know how to play it.  I've read that it is a book (or several ones, which is more confusing for me to understand), but I've read somewhere that it can be played as a normal "table" game, with a board, and pieces, and somewhat weird dice (or sets of dice).  Is it like a normal game, where you pull the stuff out of a box and start to play?  I don't know if any of you watch the show "The Big Bang Theory", but I think they have played the game in a recent episode, and it looks just like a regular game.  I've Googled it for more information, but I haven't found anything as basic as I need, because I've never played a role game (except in a video game).  I just want to learn how to play, so I can get my friends into it to play it each time we get together. Is it possible to retrieve a previous un-evaluated, un-normalized input? Convert integers to written numbers Is there an efficient method of converting an integer into the written numbers, for example:  string Written = IntegerToWritten(21);   would return "Twenty One".  Is there any way of doing this that doesn't involve a massive look-up table? Entire function problem: translation The muffins were rock hard, what did I do wrong? Here is the recipe I used, I did not mix it for long, as that make the muffins very hard.   The muffins were very hard, and had a bad after taste and smell. I missed adding some oil, but what else could be the reason ?   Red Millet Flour, 50 g Whole Wheat flour, 50 g Toasted Oat Bran, 40g Whole Green Mung Beans - Sprouted, 100 g Domino - Light Brown Sugar 50g Baking Soda, 2 tsp Salt, 1 Tablespoon Liquid Egg White, 4 eggs 100% Whey (Vanilla), 75g Chobani - Greek Yogurt - 0% Vanilla, 5.3 oz (small packet) Carrots - Raw, 1 cup, grated Bananas - Raw, 1 cup, mashed White, all-purpose, enriched, bleached, 40 g   Also I wanted to try yeast instead of baking soda, but due to eggs and other veggies I cannot let is rise overnight (any ideas ?). I was trying to make good protein muffins which are an ideal breakfast, grab one with a glass of milk and done!   They run approximately 160 calories per muffin 25g carbs, 1g fat, 12g protein. Google Drive files opening in new window vs new tab? This might be a duplicate of  but that question is 5 years old and unanswered.  When I'm in drive.google.com and I open a G Suite file (either double-click or select &amp; press enter) in Firefox it opens in a new window whereas in Chrome it opens in a new tab.   Why do they do that? Is this a browser-specific quirk or a Google setting (that I haven't found)? Is there a way to control the behavior? I'd like them both to open in tabs, but presumably the same answer would be relevant in the opposite direction too. Why are one-way plane tickets more expensive than return tickets? Prove every element of $G$ has finite order. Let $G$ be a group such that the intersection of all its subgroups which are different from $\{e\}$, is a subgroup different from $\{e\}$. Prove that every element of  $G$  has finite order.  Assume that $a$ has infinite order in $G$. Then let $y\neq e$ belong to the intersection of all subgroups of $G$ different from $\{e\}$. Then $y=a^n$ and $y$ will also belong to subgroup generted by $a^2$ hence  $y=a^{2m}$ for some integers $m$. This contradicts that $a$ has infinte order.  Is this correct? Embed .mov file via 'Add Media' not working The following code works as expected in both Python 2.5 and 3.0:  a, b, c = (1, 2, 3)  print(a, b, c)  def test():     print(a)     print(b)     print(c)    # (A)     #c+=1       # (B) test()   However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons:   Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error?   The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists.  Could someone please explain this behavior? Is `sudo pip install` still a broken practice? Firefox application associations not working in the 'Downloads' window No matter what changes i make to file associations (actions) in the 'Applications' tab in Firefox, they're totally ignored. For example, i set .wmv and .avi files to open with 'smplayer' but when i download a file and double-click on it (through the 'Downloads' window), it keeps opening with Totem player.    The default file associations through nautilus ('open with' tab) work fine, i.e. i've set smplayer as the default player and when i double-click a video file it open correctly.  I've tried to delete and recreate mimetypes.rdf but that didn't help.  Any ideas on what else should i check? How do I effectively defeat the Wall of Flesh? I've been having trouble defeating this monster. Even with lots of buff potions, health potions, high tier armor (Molten), and ranged weapons with plenty of ammo (Minishark), I can't seem to kill this boss.  Worse, when I get it down to about 2000 hp, even if I'm fairly far away, it'll suck me in and continually rise towards the skybox, which doesn't allow me to do anything for some reason.  How do I defeat the Wall of Flesh? What gear should I be using and what kind of potions do I need? If $p,q$ are primes $(pq,a)=1$ and $p-1|q-1$ then prove $a^{q-1}\equiv 1\pmod{pq}$ $p,q$  primes, $(pq,a)=1$ and $p-1|q-1$ then prove $a^{q-1}\equiv 1\pmod{pq}$   Got this in an exam today and had no idea how to do it. Proving Binomial Identity without calculus How to establish the following identities without the help of calculus:  For positive integer $n, $ $$\sum_{1\le r\le n}\frac{(-1)^{r-1}\binom nr}r=\sum_{1\le r\le n}\frac1r $$  and  $$\sum_{0\le r\le n}\frac{(-1)^r\binom nr}{4r+1}=\frac{4^n\cdot  n!}{1\cdot5\cdot9\cdots(4n+1)}$$