Re: [TDK] Wrapped Starkit not working with cron
by asilver other posts by this author
Sep 22 2006 1:27PM messages near this date
view in the new Beta List Site
Re: [TDK] Wrapped Starkit not working with cron
|
Re: [TDK] Wrapped Starkit not working with cron
<html>
<P> Forgot to include the actual crontab file. the example from the previous e-mail&nbs
p;was the shell script that was called by this cron job:</P>
<P> [asilver@linux-1 net-scripts]$ crontab -l<BR>
30 2 * * * /home/asilver/net-scripts/config_bkups.sh<BR>
[asilver@linux-1 net-scripts]$<BR>
<BR>
<BR>
<BR>
<B> On Fri Sep 22 0:57 , <ASILVER@[...].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">
<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. Only recently I'm trying to switch over to
tclapp and I noticed this problem. The basekit I created is located in the same direct
ory as the exectuable script itself. Also, I am using full path names when creating th
e cron script. Here is my cron job that has been working for years when the copy_to_tf
tp script was build with mktclapp</P>
<P> </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>
&n
bsp; -rf ${P}/rtr_list.rt -ipaddr 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> > X-Cron-Env: <PATH= usr bin: bin></FONT><BR>
...<BR>
<FONT color=red> > It appears my PATH variable in Cron is different than my PATH </FONT><B
R>
<FONT color=red> > variable when I'm in the shell. The base-kit </FONT><BR>
<FONT color=red> > "net-sense_base_lintcl" is in my path when in the Bash Shell </FONT><BR
>
<FONT color=red> > but not in cron. If I'm not mistaken, I believe I can set </FONT><BR>
<FONT color=red> > the Cron Path in Linux but I'm not sure if I can do that in </FONT><BR>
<FONT color=red> > 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://www.ActiveState.com/" target=_bla
nk> <FONT color=red>http://www.ActiveState.com/</FONT></A><BR>
<BR>
<BR>
</BLOCKQUOTE> <BR>
</BLOCKQUOTE>
</html> <BR>
Thread:
Allan Silverstein
Jeff Hobbs
asilver
asilver
|