I have a cronjob that I need to run everyday and it needs to have todays date inputed, here is what I have, but is not working as expected..........
23 02 * * * cd /path;./RequestSummaryReport.sh $(date +%Y-%m-%d)
the output from mail gives me.............
Code:
Date: Fri, 8 Feb 2008 02:12:07 -0600 (CST)
From: root@hostname.com
Message-Id: <200802080812.m188C74S025870@hostname.com>
Subject: cron
stty: : Not a typewriter
Please Enter the date for which you want the Daily Summary Report: (YYYY-MM-DD)
You entered:
Y-
is that correct?(y|n)
Buildfile: /path/ARAutoPostJMSClient.xml
run:
[input] skipping input as property report.request has already been set.
[java] Retrieving a QueueConnectionFactory from JNDI
[java] factory created...
[java] Creating a Connection
[java] Starting the Connection
[java] Creating a Session
[java] Retrieving a Queue from JNDI
[java] Creating a QueueSender
[java] Creating a TextMessage
[java] Adding Text
[java] -Sending message [<ReportMsg><ReportType>autopostpayment.SummaryReport</ReportType><FileId></FileId><Date>Y-</Date></ReportMsg>] to queue://HDS.P.01/HDS.REQUEST.AR_REPORT.1_0
[java] Closing QueueSender
[java] Closing Session
[java] Closing Connection
[java] finished
BUILD SUCCESSFUL
Total time: 4 seconds
*************************************************
Cron: The previous message is the standard output
and standard error of one of your crontab commands:
cd /path;./RequestSummaryReport.sh $(date +
Why is this date format not working correctly? If I manualy run
/path/RequestSummaryReport.sh $(date +%Y-%m-%d) it works fine. ?????
Dave