RE: crontab and exec

RE: crontab and exec

 

  

Duh, nevermind still not working.


54 16 * * * /bin/echo "`date`" >>
/u01/app/oracle/autorun/rman/crontab.lis

This spits out "Fri Dec 30 21:56:00 GMT 2005" at 4:54pm EST... cron is
still scheduling EST... even though it will spit out the date for GMT?

What's going on?

-----Original Message-----
From: Patterson Joel
[mailto:oracledba-ezmlmshield-x54843156.[Email address protected]
Sent: Friday, December 30, 2005 4:10 PM
To: LazyDBA Discussion
Subject: RE: crontab and exec

Happy New Year Ed and folks!

Eh I got the crontab timezone thingy (I think). I reset the hardware
clock to run on the same time as the system clock.
http://www.linuxsa.org.au/tips/time.html


(I am assuming that cron runs on the hardware clock? Doesn't actually
make sense to me, but that is as far as I have gotten without some
intelligent sysadmin help).


Have fun and be careful with amateur night.



-----Original Message-----
From: Patterson Joel
[mailto:oracledba-ezmlmshield-x21451986.[Email address protected]
Sent: Friday, December 30, 2005 11:59 AM
To: LazyDBA Discussion
Subject: RE: crontab and exec

P.S.S. The cron EST setting was a contributing factor to the confusion
in that I was getting no results two ways. One it wasn't running, :),
and two, it wasn't working, even after I thought I figured out one,
::)).

-----Original Message-----
From: Chris Hagemaier
[mailto:oracledba-ezmlmshield-x84639450.[Email address protected]
Sent: Thursday, December 29, 2005 5:56 PM
To: LazyDBA Discussion
Subject: RE: crontab and exec

Joel-
I'm not at all a Linux person, but from what I've been reading I'm
pretty sure that this isn't behaving like you expect:

Exec 1>${file} 2>&1

I think you might want something more like this:

Exec 1>>&${file}

Check these out:

http://linux.about.com/od/commands/l/blcmdln_exec.htm

http://www.die.net/doc/linux/man/mann/exec.n.html



-----Original Message-----
From: Patterson Joel
[mailto:oracledba-ezmlmshield-x70898580.[Email address protected]
Sent: Thursday, December 29, 2005 1:27 PM
To: LazyDBA Discussion
Subject: RE: crontab and exec

I can echo, echo, and it will go to the file as follows:

Echo "Here I go " >> /u01/file.lis

Then,
Exec 1>${file} 2>&1

Echo "Here I don't go " >> /u01/file.lis

It is as simple as that. I even sourced echo...
ECHO=/bin/echo

$ECHO "Here I don't go " >> /u01/file.lis

This only doesn't work when executing the script from cron.



-----Original Message-----
From: Chris Hagemaier
[mailto:oracledba-ezmlmshield-x72175287.[Email address protected]
Sent: Thursday, December 29, 2005 3:59 PM
To: LazyDBA Discussion
Subject: RE: crontab and exec

Joel-
Is ${file} part of your environment or to you pass it to the script?
Just a thought but consider that cron jobs execute without an
environment. For example $PATH doesn't exist.

-----Original Message-----
From: Patterson Joel
[mailto:oracledba-ezmlmshield-x30363202.[Email address protected]
Sent: Thursday, December 29, 2005 12:51 PM
To: LazyDBA Discussion
Subject: crontab and exec




I'm having a heck of a time with cron on WBEL (linux). (sysadmin being
twirp) -- teaching me sysadmin by letting me figure it out myself, (ie
lazy)... except I don't want to be a sysadmin... nuf of that).

1) Some of you may recall my "exec 1>${file} 1>&2" line of code I use
in my scripts... I am attempting to solve my original riddle (which I
won't go into here), by running my script now via cron. What used to
work does not seem to correctly, at least on this box.

I cannot get any statement after the 'exec' to echo anywhere IF the
script is called from cron. (It works otherwise).

-------------------

2) ALSO. cron is runnig on EST, and my 'date' displays GMT... (I want
cron to run on GMT time as well.

More /etc/sysconfig/clock
ZONE="Europe/London"
UTC=true
ARC=false

Other server have different settings. Where do I go from here?
Something is missing as 'normal' sysadmins have already set up such
things for me and my scripts 'normally' work.


Thanks


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com To unsubscribe:
see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com By using this list you agree
to these terms:http://www.lazydba.com/legal.html



--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.

Douglas County, Oregon
www.co.douglas.or.us



--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html




--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html



--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.

Douglas County, Oregon
www.co.douglas.or.us



--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html




--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html




--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html



Oracle LazyDBA home page