From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Skulley, William" Newsgroups: gmane.os.tru64.managers Subject: Silly Cron/Script Questions Date: Tue, 04 Jun 2002 13:29:38 -0600 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <034FA6BC04A6754B8E16094B46E8960808DB3A@EXCHSRV3.rfets.gov> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: main.gmane.org 1023219036 8878 127.0.0.1 (4 Jun 2002 19:30:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 4 Jun 2002 19:30:36 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.33 #1 (Debian)) id 17FK0p-0002J5-00 for ; Tue, 04 Jun 2002 21:30:35 +0200 Original-Received: (qmail 27237 invoked by uid 5); 4 Jun 2002 19:30:07 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 27229 invoked from network); 4 Jun 2002 19:30:07 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (128.219.159.41) by 0 with SMTP; 4 Jun 2002 19:30:07 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0GX700JB84U660@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 04 Jun 2002 15:30:06 -0400 (EDT) Original-Received: from rfgate2-qfe0.rfets.gov (rfgate.rfets.gov [167.253.11.253]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with SMTP id <0GX700EN54TMAZ@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 04 Jun 2002 15:29:48 -0400 (EDT) Original-Received: from [167.253.140.13] by rfgate2-qfe0.rfets.gov via smtpd (for emroute2.cind.ornl.gov [128.219.159.41]) with SMTP; Tue, 04 Jun 2002 19:29:46 +0000 (UT) Original-Received: by exchsrv2.rfets.gov with Internet Mail Service (5.5.2653.19) id ; Tue, 04 Jun 2002 13:29:45 -0600 Original-To: tru64-unix-managers@ornl.gov X-Mailer: Internet Mail Service (5.5.2653.19) Xref: main.gmane.org gmane.os.tru64.managers:435 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:435 I have a cronjob: 0 0 * * * script.ksh arg1 arg2.`date +%y%m%d` arg2 is an output filename. When run from cron, the file comes out "arg2." with no date information tacked on. Running the exact same command line from a shell (sh) prompt gets the date information properly (filename arg2.020604). I get the following mail from cron: ************************************************* Cron: The previous message is the standard output and standard error of the following crontab command: script.ksh arg1 arg2.`date + If I add double quotes and change the cron entry to: 0 0 * * * "script.ksh arg1 arg2.`date +%y%m%d`" the job does not run and I get the following mail from cron: sh: script.ksh arg1 arg2.: not found ************************************************* Cron: The previous message is the standard output and standard error of the following crontab command: "script.ksh arg1 arg2.`date + What am I missing? I'm sure its something really obvious and silly but I can't for the life of me see it. Thanks Bill Skulley