This is the mail archive of the
cygwin
mailing list for the Cygwin project.
2 cron problems and 1 solution on XP
- From: "Mike Dieter" <quincunx12252000 at hotmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 30 Sep 2005 22:35:17 -0500
- Subject: 2 cron problems and 1 solution on XP
- Bcc:
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!
Attachment:
cygcheck.out
Description: Text document
--
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/