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 ) 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 ; Tue, 25 Mar 2008 07:37:09 +0000 (UTC) Received: by wx-out-0506.google.com with SMTP id h30so2860689wxd.10 for ; 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" To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] crontab entry Cc: "Collin Starkweather" In-Reply-To: <6b16fb4c0803242341h14670830m514e95b7a17992@mail.gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail 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 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 > > > 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 " > > > > echo "To: Michael Edenfield " > > > > 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 <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

--


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-- -- gentoo-user@lists.gentoo.org mailing list