Gentoo Archives: gentoo-user

From: Kaushal Shriyan <kaushalshriyan@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] crontab entry
Date: Mon, 24 Mar 2008 17:52:36
Message-Id: 6b16fb4c0803241052r392f7bc4y930ec1dc74418130@mail.gmail.com
In Reply to: Re: [gentoo-user] crontab entry by Kaushal Shriyan
1 On Mon, Mar 24, 2008 at 9:13 PM, Kaushal Shriyan <kaushalshriyan@×××××.com>
2 wrote:
3
4 > On Mon, Mar 24, 2008 at 7:59 PM, Mike Edenfield <kutulu@××××××.org> wrote:
5 >
6 > > Kaushal Shriyan wrote:
7 > > > Hi I have the following entry in the crontab
8 > > >
9 > > > MAILTO=systems@×××××××.com
10 > > > 0 18 * * * /home/kaushal/rsync_mysql.sh
11 > > >
12 > > > I want my subject line to be "hostxx:yyDB refresh daily"
13 > > >
14 > > > is there a way to do it
15 > > >
16 > > > Thanks and Regards
17 > > >
18 > > > Kaushal
19 > > >
20 > >
21 > > The easiest way is to write a wrapper script; I have a few of them that
22 > > do something like:
23 > >
24 > >
25 > > (
26 > > echo "From: songbird.jungle <root@××××××××.jungle>"
27 > > echo "To: Michael Edenfield <kutulu@××××××.org>"
28 > > echo "Subject: Portage Update Report"
29 > > echo ""
30 > >
31 > > # do stuff here.
32 > >
33 > > ) | sendmail kutulu@××××××.org
34 > >
35 > > --
36 > > gentoo-user@l.g.o mailing list
37 > >
38 > >
39 >
40 > Hi,
41 >
42 > I have two scripts file one is http://pastebin.com/m263e6f3c and
43 > http://pastebin.com/m175098db.
44 >
45 > The requirement is run http://pastebin.com/m175098db script once the below
46 > line succeeds in the http://pastebin.com/m263e6f3c
47 >
48 > if /usr/bin/rsync -av /var/lib/mysql host77:/var/lib/ >
49 > /tmp/rsync-${TIMESTAMP}.log 2>&1
50 > then
51 > /usr/bin/mailx -s "Success: host77 DB refresh daily" kaushal@×××××××.com< /tmp/rsync-${TIMESTAMP}.log
52 >
53 > I am not able to proceed
54 >
55 > Thanks and Regards
56 >
57 > Kaushal
58 >
59
60 Hi
61
62 I have combined the script http://pastebin.com/m77e0e752, is it ok
63
64 Thanks and Regards
65
66 Kaushal