tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Brown, Tim" <TBrown@amherst1.com>
Subject: Summary: Running collect in crontab
Date: Tue, 06 May 2003 15:28:56 -0400	[thread overview]
Message-ID: <DDF5D31FBFE4D311983500508B6DCF6407AEA1CC@AMH-EXC1.amherst1.com> (raw)

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



                 reply	other threads:[~2003-05-06 19:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox