Ls -l --time-style long-iso produces your original output, but I don't
know how you're getting it set. Do you have something odd in your locale
settings?
Remember that cron does not run in your login shell, net even in a
standard system login shell. None of your environment variables get set,
and you should not depend on any of them.
One solution to your problem (though it won't track down its cause)
would be to add the --time-style long-iso to your cron ls command.
--
.~. Robert P. Nix Mayo Foundation
/V\ RO-OC-1-13 200 First Street SW
/( )\ 507-284-0844 Rochester, MN 55905
^^-^^ -----
"In theory, theory and practice are the same, but
in practice, theory and practice are different."
-----Original Message-----
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of
Fargusson.Alan
Sent: Thursday, November 16, 2006 12:19 PM
To: [email protected]
Subject: Re: cron oddity?
I can't reproduce this, but my guess is that some ls option is being set
in /etc/profile. The cron jobs don't source /etc/profile. You could
source /etc/profile in your cron job with ". /etc/profile" and see if
that makes it work.
-----Original Message-----
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of
Mark D Pace
Sent: Thursday, November 16, 2006 8:29 AM
To: [email protected]
Subject: cron oddity?
I've written a rexx program to run under cron to do clean up on a
directory. It runs fine when I run it myself, but it fails under cron.
Trace output from the cron run job shows
"sudo ls -lGgh /srv/ftp/pub"
"-r--r--r-- 1 14M Nov 7 16:02 GE_Mainline_Ansys ver2.ppt"
HUH? when I do it manually the output is
"sudo ls -lGgh /srv/ftp/pub"
"-r--r--r-- 1 14M 2006-11-07 16:02 GE_Mainline_Ansys ver2.ppt"
If I manually do an ls command I get the format with the date as
yyyy-mm-dd. Why would the ls command under cron get a date format of
Month Day?
Very confused....
Mark D Pace
Senior Systems Engineer
Mainline Information Systems
1700 Summit Lake Drive
Tallahassee, FL. 32317
Office: 850.219.5184
Fax: 888.221.9862
http://www.mainline.com
This e-mail and files transmitted with it are confidential, and are
intended solely for the use of the individual or entity to whom this
e-mail
is addressed. If you are not the intended recipient, or the employee or
agent responsible to deliver it to the intended recipient, you are
hereby
notified that any dissemination, distribution or copying of this
communication is strictly prohibited. If you are not one of the named
recipient(s) or otherwise have reason to believe that you received this
message in error, please immediately notify sender by e-mail, and
destroy
the original message. Thank You.
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390