2 cron problems and 1 solution on XP

Mike Dieter quincunx12252000@hotmail.com
Sat Oct 1 03:35:00 GMT 2005


I'm running the latest version of CYGWIN from XP home edition
PROBLEM ONE
and I found that in my cron file
THIS
10 9 * * 1-5 /home/Gary/MCD.send --subject "`date +%B` Clearance" 2>&1 > 
/dev/null &

gave the error that it  ..... date + end of file looking for missing ``'
well ignoring the + sign there I escaped the space after date and still got 
the problem

I HAVE TO READ ERROR MESSAGES BETTER

So next I tried only escaping the percent sign AND IT WORKED!
10 9 * * 1-5 /home/Gary/MCD.send --subject "`date +\%B` Clearance" 2>&1 > 
/dev/null &

You might want to still look at CRON I have NO PROBLEM running this script 
from the terminal but IT WOULD NOT WORK AT ALL from CRON.

PROBLEM TWO
This might just be my ignorance but I do all my crontabs like the above, ie, 
2>&1  > /dev/null &
to prevent cron mailing me with these error messages AND IT STILL DOES!

Is there a way to suppress CRON MAILING ME from 'mature' scripts where I 
think I know what cron will say and I don't care?

Finally, is & necessary?  Or are there times when it still is good to have?


Have a good week end!

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20051001/ae5b77b1/attachment.ksh>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list