I am trying to set up a cronjob to execute the following script. The function of the script is to find and compress png and jpg files in a WordPress directory.      #!/bin/bash echo `date` &gt;&gt; /root/optipng.log find /home/ghost/wp-content/uploads -mtime -2 -iname '*.png' -print0 | \  xargs -0 optipng -o7 -log /root/optipng.log -preserve echo `date` &gt;&gt; /root/jpegoptim.log find /home/ghost/wp-content/uploads  -mtime -2 -iname '*.jpg' -print0 | \  xargs -0 jpegoptim --max=90 --preserve --totals &gt;&gt; /root/jpegoptim.log   So I created a file "optimize.sh" in /usr/local directory  and ran "crontab -e" and added the following command:   00 10 * * *  root  /usr/local/optimize.sh   This is supposed to run the image optimization every day at 10:00 hours but it is not working in this case, I even tried to create a log file by modifying the above command as:  00 10 * * *  root  /usr/local/optimize.sh &amp;&gt;/var/log/cron.log   The log file is empty and cron job is not running. I did try the other methods mentioned in Stack Overflow, none of them seemed to work. I am also listing some other tutorials which I turned for help:      Can someone please point out where the mistake is? :)  PS- I gave 700 permission to the file /usr/local/optimize.sh and I tried running the file directly via ssh and it returns the following error:  /bin/bash^M: bad interpreter: No such file or directory   Here is a picture of the exact way the commands are written using nano editor:   This question is different from others in Stack Overflow like  in the sense that the error was not in the way cron file was written, but there were some hidden spaces in the file optimize.sh.
I have a cron job that runs every minute on an Ubuntu 12.04 box  $sudo crontab -e * * * * * mylogin /pathto/file.sh &gt; /log/filelog   If I run file.sh, the bash script does some stuff and echos out runs:  $ ./file.sh  runs   If I check the log of cron tab it shows that the job is running:  Jul 10 12:41:01 localhost CRON[1811]: (root) CMD (mylogin /pathto/file.sh &gt; /log/filelog) Jul 10 12:41:01 localhost CRON[1810]: (CRON) info (No MTA installed, discarding output) Jul 10 12:42:01 localhost CRON[1813]: (root) CMD (mylogin /pathto/file.sh &gt; /log/filelog)   However, the script is not running. It is not doing it's work and not echoing runs to /log/filelog.  $cat /log/filelog  #shows nothing   What other steps can I take to debug this problem?
Prove $\mathbb{Z}_2 \times \mathbb{Z}_2$ is not isomorphic to $\mathbb{Z}_4$ I am interested in publishing a GML file as a WFS. I don't want to use a database like PostgreSQL. What would be the rough steps I need to do for that? I like to use open source software (geoserver). I don't have much experience. I am just looking for a rough guide what kind of software I should look into and which step follows which step.. Why does part of my model disappear when I zoom in on it in the 3D Viewport? I'm having an odd issue - When I try to zoom in on a detail using my MMB, the "camera" in the 3D view seems to be cutting off the exterior surface of my object and showing me the inside instead. I'd expect this behavior, but only when I was much more zoomed in.  If I zoom out a bit (one click on the scroll wheel) then I can see the exterior as I intend.  Is there any way to adjust this behavior?  Thanks! Get week of year in JavaScript like in PHP Taking Seats on a Plane Foreign key constraint on array member? In the current era of cricket, we see batsmen using switch hits to play a ball. That is, while playing a ball they change their batting side (left to right handed and vice versa) just before the ball comes to them.  My question is, can a bowler bowl a switch ball? Meaning, can a left hand bowler bowl right handed to a batsman? If it is not permitted, then is it not unfair to the bowlers that batsmen can change their batting style but not the bowlers? Or are there are any rules against a switch hit? Let $R$ be the subring of $M_2(\mathbb{R})$ defined by $$R=\left\{\begin{pmatrix}a&amp;b\\0&amp;d\end{pmatrix}\mid a\in\mathbb{Q},b,d\in\mathbb{R}\right\}$$  Show that $R$ is right-Artinian but not left-Artinian.  The "obvious" approach to show it is not left-Artinian is to find an $A\in R$ such that $$RA\supset R(A^2)\supset R(A^3)\supset\dots$$  is an infinite decreasing chain of proper left submodules of $R$ (as a module over itself). However, after spending a lot of time in this endeavor I've come to the conclusion that no such element $A$ exists (I can post a proof if anybody is interested but it'd be long and not worth the time for me otherwise). Does anybody have an idea for another approach I can take to this? I have no idea what else submodules of $R$ would look like. Is there an editor or IDE (or a script) for substituting the TeX-Commands $ and $$ for opening and closing math regions into the corresponding LaTeX-Commands \(,\) and \[,\]? I'm sure there is a tool - and I'm searching for. I think, this will result in better readable code. A simple search and replace wont do that - but with regular expressions, that should not be problem. I simply do not want to invent the wheel a second time. User is suspended network-wide, except not really A user has been active on one of the sites recently, even though they're concurrent suspended network-wide on the rest of the network. How is this possible, and is it possible to evade a network suspension on only one site? Automatically make various multiple stroke colour the same as various underlying fill colours. I have auto traced a photograph in illustrator - its got thousands of vectors once I expand it and illustrator has converted each of them to a filled colour - I want to now trace the edges of them with a grungy brush but using the underlying fill colour. Where in illustrator can I stroke or outline these fills using the underlying colour - surely this is something that the program automatically does?   I've found this script online but don't know how to implement it. I'm new to this so any help appreciated. Many thanks.   James   var idoc = app.activeDocument;   var sel = idoc.selection;    for (i=0; i&lt;sel.length; i++) {       var ipath = sel[i];       ipath.stroked = true;       ipath.strokeColor = ipath.fillColor;   } How to execute sp_send_dbmail while limiting permissions Is there a way to provide access to users in my database to execute  msdb.dbo.sp_send_dbmail without needing to add them to the MSDB database and the DatabaseMailUserRole?  I've tried this:  ALTER PROCEDURE [dbo].[_TestSendMail] (   @To NVARCHAR(1000),   @Subject NVARCHAR(100),   @Body NVARCHAR(MAX) ) WITH EXECUTE AS OWNER AS      BEGIN         EXEC msdb.dbo.sp_send_dbmail @profile_name = N'myProfile',             @recipients = @To, @subject = @Subject, @body = @Body     END   But I get this error:  The EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'.   Thanks! "Over vs Above" and "Under vs below" Is is possible to say that "Above" means "over" and "Under" means"below", but not the opposite?  According to my grammar:  Over - In a higher position (close or touching) Above - In a higher position  Under - In a lower position (close or touching) Below - In a lower position  Example:     There's a helicopter flying round above / over the school.   I would interpret this sentence as "above" meaning almost touching the school or not. And If I hear "over", the helicopter is almost touching school.  This makes me think about "over" and "on". "On" means that something is touching something, but if "over" can mean also "touch".Well, I would never use "over" to mean "touching something", I would use "on" instead. I know that for continuous variable $P[X=x]=0$.   But i can't visualize that if $P[X=x]=0$, there is infinite number of possible $x$'s. And also why do their probabilities get infinitely small ? How can I use function's parameter in it? Anyone know if R has quote-like operators like Perl's qw() for generating character vectors? The ls -al command shows the following output;  -rwxrw-r--    10    root   root 2048    Jan 13 07:11 afile.exe   What are all the fields in the preceding display? Cross-reference packages: which to use, which conflict? Inspired by my earlier question , here is another similar question.  There are many different packages for making cross references. Among them , , , , … The  package defines its own cross-referencing command for theorems…  Which collection of packages provides which kind of functionality, and which packages cause conflicts with each other? Should a user be forced to add a comment when they vote to close? Mixed content on many SE sites Many SE sites (like math.SE) have a problem with mixed content, which causes display bugs in recent browsers. This is particularly evident with math.SE (because of the huge use of MathJax) and with chat sections.  Will this be fixed?  How to reproduce  Visit  or   What happens  Mixed content is blocked, output is missing pieces of code (MathJax):    This picture also includes my main Firefox addons (top right), it relevant. It shows missing styles:    The white on the left is my tab list.