ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tdk
tdk
Re: [TDK] Wrapped Starkit not working with cron
by asilver other posts by this author
Sep 22 2006 12:57PM messages near this date
view in the new Beta List Site
Re: [TDK] Wrapped Starkit not working with cron | [TDK] (no subject)
<html> 


<P> Thanks Jeff,</P>

<P> I guess why I sent this out is because I was using mktclapp, with shared libriares, for y
ears and have not had a problem with cron.&nbsp; Only recently I'm trying to switch over to 
tclapp and I noticed this problem.&nbsp; The basekit I created is located in the same direct
ory as the exectuable script itself.&nbsp; Also, I am using full path names when creating th
e cron script.&nbsp; Here is my cron job that has been working for years when the copy_to_tf
tp script was build with mktclapp</P> 

<P> &nbsp;</P>

<P> D=`date +%m%d%y`</P>

<P> P="/home/asilver/net-scripts"</P>

<P> /usr/local/net-sense/bin/copy_to_tftp -log ${P}/cron_logs/copy_to_tftp_routers_${D}.log -
pw ${P}/logins.var \<BR> 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp; -rf ${P}/rtr_list.rt -ipaddr&nbsp;10.1.1.1 -subdir rtr_configs/${D} -tftproot /tftpboot
<BR> 
<BR> 
<BR> 
I can research the changing the PATH varialble in cron but I'd really like to know if there 
is any other way to get around this (in tcl or tcldevkit) so I don't (or my users don't) hav
e to modify the PATH variable in cron.</P> 

<P> Thanks</P>

<P> al</P>

<P> <BR>
<B> On Fri Sep 22 12:32 , "Jeff Hobbs" <JEFFH@[...].COM>sent:<BR>
<BR> 
</P> </B>

<BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #51
67c6 2px solid; MARGIN-RIGHT: 0px"> Allan Silverstein wrote:<BR>
...<BR> 
<FONT color=red> &gt; X-Cron-Env: <PATH= bin bin: usr></FONT><BR>
...<BR> 
<FONT color=red> &gt; It appears my PATH variable in Cron is different than my PATH </FONT><B
R> 
<FONT color=red> &gt; variable when I'm in the shell. The base-kit </FONT><BR>
<FONT color=red> &gt; "net-sense_base_lintcl" is in my path when in the Bash Shell </FONT><BR
> 
<FONT color=red> &gt; but not in cron. If I'm not mistaken, I believe I can set </FONT><BR>
<FONT color=red> &gt; the Cron Path in Linux but I'm not sure if I can do that in </FONT><BR>
<FONT color=red> &gt; Solaris. Is there another way to resolve this issue? Thanks</FONT><BR>
<BR> 
This is really a simple unix daemon question, and not really relevant to any<BR> 
Tcl specifics. However, the best way to always manage cron scripts from<BR> 
experience is to use fully qualified paths. There are ways to adjust the cron<BR> 
PATH, but it will vary between systems.<BR> 
<BR> 
Jeff Hobbs, The Tcl Guy, <A href="parse.pl?redirect=http%3A%2F%2Fwww.ActiveState.com%2F" tar
get=_blank> <FONT color=red>http://www.ActiveState.com/</FONT></A><BR>
<BR> 
<BR> 
</BLOCKQUOTE> 

</html> <BR>
Thread:
Allan Silverstein
Jeff Hobbs
asilver
asilver

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved