PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: tscheresky <tscheresky at micron dot com>
Subject: RE: Perl thru crontab
Date: Feb 1 2000 11:09PM

Hmm... even with the BEGIN block?  I will need to investigate why it is
working for me on Solaris 2.6 with Perl 5.005_03.

-----Original Message-----
From: Michael Peppler [mailto:mpeppler@peppler.org]
Sent: Tuesday, February 01, 2000 4:00 PM
To: SybPerl Discussion List
Subject: RE: Perl thru crontab


tscheresky writes:
 > Now for the Perl solution.  Do this:
 > 
 > ##
 > ## The following defines those paths required by Syperl on the first pass
of
 > ## compilation.  This must be done for Syperl to work correctly when run
 > from
 > ## cron.
 > ##
 > BEGIN { $ENV{'SYBASE'} = "/opt/sybase"; $ENV{'LD_LIBRARY_PATH'} =
 > "/opt/sybase/lib"; };

Sorry - but that last bit won't work, unless you re-exec your
script. You can't set LD_LIBRARY_PATH for the running process, only
for child processes...

Michael


 > 
 > -----Original Message-----
 > From: Bulah, Fred [mailto:fred.bulah@csfb.com]
 > Sent: Tuesday, February 01, 2000 8:38 AM
 > To: SybPerl Discussion List
 > Subject: RE: Perl thru crontab
 > 
 > 
 > 
 > You don't have to set up a separate shell script to get environment
 > variables set, but you do have to run in a sub-shell with them set.
 > Here's a sample line from one of my cron jobs:
 > 
 > 0       7       *       *       1-5     /bin/ksh "(.
 > /home/fbulah/.profile.prod ; cd ./prod/bin ;
 > /home/fbulah/prod/bin/spa_get_symbols.pl -elocalprod
 > >>/home/fbulah/prod/logs/spa_get_symbols.log 2>&1)"
 > 
 > You set up a .profile with the necessary environment variables, aliases,
 > etc.  You kick off the perl script from a shell that executes the profile
 > prior to running your script.
 > 
 > 
 > > -----Original Message-----
 > > From:	Miao, Qian (PME) [SMTP:QianM@exchange.ml.com]
 > > Sent:	Tuesday, February 01, 2000 10:10 AM
 > > To:	SybPerl Discussion List
 > > Subject:	RE: Perl thru crontab
 > > 
 > > cron job doesn't take environment variables that you set for your
command
 > > shell environment. 
 > > you can write a shell script to setup all necessary environment
variables
 > > first, then call your Perl script. 
 > > Instead of running Perl script directly from crontab, you run this
shell
 > > script. this way you don't have to 
 > > get your SA involved in set up  default cron variables.
 > > 
 > > 
 > > > -----Original Message-----
 > > > From:	Manjeet Kalsi [SMTP:manjeet.kalsi@prudential.com]
 > > > Sent:	Tuesday, February 01, 2000 9:18 AM
 > > > To:	SybPerl Discussion List
 > > > Subject:	Perl thru crontab
 > > > 
 > > > 
 > > > 
 > > > 
 > > > Gurus,
 > > > 
 > > > I am trying to run one of my programs as cron job and I get the
 > > following
 > > > error.
 > > >  Any ideas?
 > > > Program runs fine from command line.
 > > > 
 > > > 
 > > > 
 > > > Can't load
 > > >
 > >
'/usr/local/lib/perl5/site_perl/ultra-solaris/auto/Sybase/CTlib/CTlib.so'
 > > > for
 > > > module
 > > > Sybase::CTlib: ld.so.1: /usr/local/bin/perl: fatal: libct.so: open
 > > failed:
 > > > No
 > > > such file or directory
 > > > at /usr/local/lib/perl5/DynaLoader.pm line 140.
 > > > 
 > > >  at /usr/local/lib/perl5/site_perl/Sybase/CTlib.pm line 845
 > > > BEGIN failed--compilation aborted at /home/x098919/DBA/dbusage.pl
line
 > > 18.
 > > > 
 > > > 
 > > > 
 > > > THANKS
 > > > 
 > > > Manjeet
 > > > 
 > 
 > This message is for the named person's use only.  It may contain 
 > confidential, proprietary or legally privileged information.  No 
 > confidentiality or privilege is waived or lost by any mistransmission.
 > If you receive this message in error, please immediately delete it and
all
 > copies of it from your system, destroy any hard copies of it and notify
the
 > sender.  You must not, directly or indirectly, use, disclose, distribute,

 > print, or copy any part of this message if you are not the intended 
 > recipient. CREDIT SUISSE GROUP and each of its subsidiaries each reserve
 > the right to monitor all e-mail communications through its networks.  Any
 > views expressed in this message are those of the individual sender,
except
 > where the message states otherwise and the sender is authorised to state 
 > them to be the views of any such entity.
 > 

-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com