From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Brown, Tim" Newsgroups: gmane.os.tru64.managers Subject: Summary: Running collect in crontab Date: Tue, 06 May 2003 15:28:56 -0400 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: main.gmane.org 1052249288 2433 80.91.224.249 (6 May 2003 19:28:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 6 May 2003 19:28:08 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Tue May 06 21:28:05 2003 Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.22.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 19D86e-0000cR-00 for ; Tue, 06 May 2003 21:28:04 +0200 Original-Received: (qmail 5311 invoked by uid 5); 6 May 2003 19:29:18 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 5302 invoked by uid 49493); 6 May 2003 19:29:18 -0000 Original-Received: from TBrown@amherst1.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(-4.7/5.0):. Processed in 0.395565 secs); 06 May 2003 19:29:18 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (160.91.4.119) by 0 with SMTP; 6 May 2003 19:29:17 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HEH002DQCSRAJ@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 06 May 2003 15:29:16 -0400 (EDT) Original-Received: from qacom.amherst1.com ([12.105.87.132]) by emroute1.cind.ornl.gov (PMDF V6.2 #30669) with SMTP id <0HEH0065NCSLSJ@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 06 May 2003 15:29:10 -0400 (EDT) Original-Received: from amh-exc1.amherst1.com by qacom.amherst1.com via smtpd (for emroute1.cind.ornl.gov [160.91.4.119]) with SMTP; Tue, 06 May 2003 15:30:34 -0400 Original-Received: by AMH-EXC1.amherst1.com with Internet Mail Service (5.5.2653.19) id ; Tue, 06 May 2003 15:28:56 -0400 Original-To: tru64-unix-managers@ornl.gov X-Mailer: Internet Mail Service (5.5.2653.19) Xref: main.gmane.org gmane.os.tru64.managers:4143 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:4143 Thanks for the many responses to my problem, particularly Mark Scarborough and A. Mahendra Rajah. All I had to do was include a \ in front of each % in the command line in crontab. 0 8 * * * /usr/sbin/collect -s cf -R 1h -f /usr/users/`date +\%m-\%d-\%Y:\%I:\%M`_node Now when collect executes, it creates a file with the present date and time with the node name extension. Tim > I'm trying to run the collect utility in crontab everyday and have the > output file reflect the current date and time. I'm using the following > command; > > 0 8 * * * /usr/sbin/collect -s cf -R 1h -f /usr/users/`date > +%m-%d-%Y:%I:%M`_node > > This should run collect for 1 hour and then write the file with the current > date and node, i.e. 05-05-2003:12:30_node.cgz > > This works fine in command line mode but fails in crontab with this error; > error opening /dev/tty > > I believe the process wants to write to stdout but fails when running in the > background. > > What do I need to do to have this command execute in crontab? > > Thanks, > > Tim