Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Script to tar.tgz /etc, works run manually, broken when run from cron
Date: Mon, 31 Mar 2014 12:17:36
Message-Id: 20140331131718.68bdb379@hactar.digimed.co.uk
In Reply to: Re: [gentoo-user] Script to tar.tgz /etc, works run manually, broken when run from cron by Tanstaafl
1 On Mon, 31 Mar 2014 08:01:03 -0400, Tanstaafl wrote:
2
3 > > You're running tar with -v so it should produce output no matter what
4 > > it does. Is that mailed to you? What does it say?
5 >
6 > I don't have these mailed to me, but like I said, it absolutely does
7 > produce output - the problem is, when run from cron, the resulting file
8 > is only 20 bytes (empty), when I run the exact same script manhually,
9 > it produces a file of about 500K that containes the contents of /etc..
10
11 So you have no idea what output the script is producing when run from
12 cron? Not a good plan when it is not working :(
13
14 When a script runs from the terminal but not from cron it is almost
15 always because of a difference in the environments, but without seeing
16 its output we can only guess at the problem.
17
18
19 --
20 Neil Bothwick
21
22 - How many surrealists does it take to change a light bulb?
23 - Two: one to hold the giraffe, the other to fill the bathtub with
24 lots of brightly colored machine tools.

Attachments

File name MIME type
signature.asc application/pgp-signature