From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from <gentoo-user+bounces-77443-garchives=archives.gentoo.org@lists.gentoo.org>) id 1Je3ia-0005mj-Hi for garchives@archives.gentoo.org; Tue, 25 Mar 2008 07:37:12 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EDB0CE0603; Tue, 25 Mar 2008 07:37:09 +0000 (UTC) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.227]) by pigeon.gentoo.org (Postfix) with ESMTP id B1113E0603 for <gentoo-user@lists.gentoo.org>; Tue, 25 Mar 2008 07:37:09 +0000 (UTC) Received: by wx-out-0506.google.com with SMTP id h30so2860689wxd.10 for <gentoo-user@lists.gentoo.org>; Tue, 25 Mar 2008 00:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=DHi6CBIaabWXVJh1P7wnXkWM5v2eohExqAFU8c1W8Ow=; b=qds9J/QWwWK8if4mImATgrli/1OQAYhR0pIDNsRcqAuoMs+yx05T9WmEs/NzipZHsFJRsGSfeCvkrsFAxqpSuhrgv388bQip6dtq0OsmtZ78no3/+i4vcH45ByHLgqiqvEjiB2ZNbLyLO87U/zhu6r0zpqP/qdBS54PHY7G0YTI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=psjyWBeg1O6po7jdFwg6PaR96Hqv22yKrj8uusNxm31gDEbjRAVuCts831uhFQmZU6rOr5E33P/3miYhbxOkTD9NeEVKFk/0gpYLgOAQRo18Pil57g/+GmiDAKwsnhwN2lKi09PkturXCiac0eDdz35BHKewVjC+QPpGpYWs+H0= Received: by 10.114.103.1 with SMTP id a1mr13540365wac.59.1206430628762; Tue, 25 Mar 2008 00:37:08 -0700 (PDT) Received: by 10.114.120.17 with HTTP; Tue, 25 Mar 2008 00:37:08 -0700 (PDT) Message-ID: <6b16fb4c0803250037w2c2f58a7u73cb955d08aa0ed2@mail.gmail.com> Date: Tue, 25 Mar 2008 13:07:08 +0530 From: "Kaushal Shriyan" <kaushalshriyan@gmail.com> To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] crontab entry Cc: "Collin Starkweather" <gentoo@collinstarkweather.com> In-Reply-To: <6b16fb4c0803242341h14670830m514e95b7a17992@mail.gmail.com> Precedence: bulk List-Post: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_15980_13659085.1206430628758" References: <6b16fb4c0803240204w227edc7ch894f5cd224ace0be@mail.gmail.com> <47E7BAD1.3070307@kutulu.org> <6b16fb4c0803240843n1e47c864m51d037238b0f61cf@mail.gmail.com> <6b16fb4c0803241052r392f7bc4y930ec1dc74418130@mail.gmail.com> <6b16fb4c0803242341h14670830m514e95b7a17992@mail.gmail.com> X-Archives-Salt: f48fcd12-b199-42c6-8fcd-69c434a03383 X-Archives-Hash: 6c9e23a5d5ef62f809e8b064c11da470 ------=_Part_15980_13659085.1206430628758 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Mar 25, 2008 at 12:11 PM, Kaushal Shriyan <kaushalshriyan@gmail.com> wrote: > On Mon, Mar 24, 2008 at 11:22 PM, Kaushal Shriyan < > kaushalshriyan@gmail.com> wrote: > > > On Mon, Mar 24, 2008 at 9:13 PM, Kaushal Shriyan < > > kaushalshriyan@gmail.com> wrote: > > > > > On Mon, Mar 24, 2008 at 7:59 PM, Mike Edenfield <kutulu@kutulu.org> > > > wrote: > > > > > > > Kaushal Shriyan wrote: > > > > > Hi I have the following entry in the crontab > > > > > > > > > > MAILTO=systems@webaroo.com > > > > > 0 18 * * * /home/kaushal/rsync_mysql.sh > > > > > > > > > > I want my subject line to be "hostxx:yyDB refresh daily" > > > > > > > > > > is there a way to do it > > > > > > > > > > Thanks and Regards > > > > > > > > > > Kaushal > > > > > > > > > > > > > The easiest way is to write a wrapper script; I have a few of them > > > > that > > > > do something like: > > > > > > > > > > > > ( > > > > echo "From: songbird.jungle <root@songbird.jungle>" > > > > echo "To: Michael Edenfield <kutulu@kutulu.org>" > > > > echo "Subject: Portage Update Report" > > > > echo "" > > > > > > > > # do stuff here. > > > > > > > > ) | sendmail kutulu@kutulu.org > > > > > > > > -- > > > > gentoo-user@lists.gentoo.org mailing list > > > > > > > > > > > > > > Hi, > > > > > > I have two scripts file one is http://pastebin.com/m263e6f3c and > > > http://pastebin.com/m175098db. > > > > > > The requirement is run http://pastebin.com/m175098db script once the > > > below line succeeds in the http://pastebin.com/m263e6f3c > > > > > > if /usr/bin/rsync -av /var/lib/mysql host77:/var/lib/ > > > > /tmp/rsync-${TIMESTAMP}.log 2>&1 > > > then > > > /usr/bin/mailx -s "Success: host77 DB refresh daily" > > > kaushal@example.com < /tmp/rsync-${TIMESTAMP}.log > > > > > > I am not able to proceed > > > > > > Thanks and Regards > > > > > > Kaushal > > > > > > > Hi > > > > I have combined the script http://pastebin.com/m77e0e752, is it ok > > > > Thanks and Regards > > > > Kaushal > > > > > > Hi Collin, > > I have http://pastebin.com/d65195b48, I want to know how much time it > takes to execute the script, > > I know the time command > > { time sudo /usr/bin/rsync -av /var/lib/mysql kaushal@host77:/var/lib/; } > 2>/tmp/time.output > > is there a way to call the time command inside the > http://pastebin.com/d65195b48 script > > Thanks and Regards > > Kaushal > Hi Collin I could incorporate the time command in my script http://pastebin.com/d1324bbd8 http://pastebin.com/d1324bbd8 is the modified script. Just wanted to know the elasped time in minutes instead of seconds Thanks and Regards Kaushal ------=_Part_15980_13659085.1206430628758 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Mar 25, 2008 at 12:11 PM, Kaushal Shriyan <<a href="mailto:kaushalshriyan@gmail.com">kaushalshriyan@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div><div></div><div class="Wj3C7c">On Mon, Mar 24, 2008 at 11:22 PM, Kaushal Shriyan <<a href="mailto:kaushalshriyan@gmail.com" target="_blank">kaushalshriyan@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div><div></div><div>On Mon, Mar 24, 2008 at 9:13 PM, Kaushal Shriyan <<a href="mailto:kaushalshriyan@gmail.com" target="_blank">kaushalshriyan@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div><div></div><div>On Mon, Mar 24, 2008 at 7:59 PM, Mike Edenfield <<a href="mailto:kutulu@kutulu.org" target="_blank">kutulu@kutulu.org</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div><div></div><div>Kaushal Shriyan wrote:<br> > Hi I have the following entry in the crontab<br> ><br> > MAILTO=<a href="mailto:systems@webaroo.com" target="_blank">systems@webaroo.com</a><br> > 0 18 * * * /home/kaushal/rsync_mysql.sh<br> ><br> > I want my subject line to be "hostxx:yyDB refresh daily"<br> ><br> > is there a way to do it<br> ><br> > Thanks and Regards<br> ><br> > Kaushal<br> ><br> <br> </div></div>The easiest way is to write a wrapper script; I have a few of them that<br> do something like:<br> <br> <br> (<br> echo "From: songbird.jungle <<a href="mailto:root@songbird.jungle" target="_blank">root@songbird.jungle</a>>"<br> echo "To: Michael Edenfield <<a href="mailto:kutulu@kutulu.org" target="_blank">kutulu@kutulu.org</a>>"<br> echo "Subject: Portage Update Report"<br> echo ""<br> <br> # do stuff here.<br> <br> ) | sendmail <a href="mailto:kutulu@kutulu.org" target="_blank">kutulu@kutulu.org</a><br> <font color="#888888"><br> --<br> </font><div><div></div><div><a href="mailto:gentoo-user@lists.gentoo.org" target="_blank">gentoo-user@lists.gentoo.org</a> mailing list<br> <br> </div></div></blockquote></div><br><br></div></div>Hi,<div><br><br>I have two scripts file one is <a href="http://pastebin.com/m263e6f3c" target="_blank">http://pastebin.com/m263e6f3c</a> and <a href="http://pastebin.com/m175098db" target="_blank">http://pastebin.com/m175098db</a>. <br> <br>The requirement is run <a href="http://pastebin.com/m175098db" target="_blank">http://pastebin.com/m175098db</a> script once the below line succeeds in the <a href="http://pastebin.com/m263e6f3c" target="_blank">http://pastebin.com/m263e6f3c</a><br> <br>if /usr/bin/rsync -av /var/lib/mysql host77:/var/lib/ > /tmp/rsync-${TIMESTAMP}.log 2>&1<br>then<br> /usr/bin/mailx -s "Success: host77 DB refresh daily" <a href="mailto:kaushal@example.com" target="_blank">kaushal@example.com</a> < /tmp/rsync-${TIMESTAMP}.log<br> <br>I am not able to proceed <br><br></div>Thanks and Regards<br><font color="#888888"><br>Kaushal<br> </font></blockquote></div><br></div></div>Hi <br><br>I have combined the script <a href="http://pastebin.com/m77e0e752" target="_blank">http://pastebin.com/m77e0e752</a>, is it ok<br><br>Thanks and Regards<br><font color="#888888"><br> Kaushal<br><br> </font></blockquote></div><br><br></div></div>Hi Collin,<br><br>I have <a href="http://pastebin.com/d65195b48" target="_blank">http://pastebin.com/d65195b48</a>, I want to know how much time it takes to execute the script, <br> <br>I know the time command<br> <br>{ time sudo /usr/bin/rsync -av /var/lib/mysql kaushal@host77:/var/lib/; } 2>/tmp/time.output<br><br>is there a way to call the time command inside the <a href="http://pastebin.com/d65195b48" target="_blank">http://pastebin.com/d65195b48</a> script<br> <br>Thanks and Regards<br><font color="#888888"><br>Kaushal<br> </font></blockquote></div><br><br>Hi Collin <br><br>I could incorporate the time command in my script <a href="http://pastebin.com/d1324bbd8">http://pastebin.com/d1324bbd8</a><br><br><a href="http://pastebin.com/d1324bbd8">http://pastebin.com/d1324bbd8</a> is the modified script. Just wanted to know the elasped time in minutes instead of seconds<br> <br>Thanks and Regards<br><br>Kaushal<br> ------=_Part_15980_13659085.1206430628758-- -- gentoo-user@lists.gentoo.org mailing list