Re: pretty format can't work on cron job
- From
Jeff King <peff@peff.net>
- Date
- Nov 5, 2010, 13:14 UTC
- Message-ID
- <20101105131444.GB11707@sigill.intra.peff.net>
- In-Reply-To
- <7B2091481B9ED640A92789B0CA07059587CD03@CDCEXMAIL02.tw.trendnet.org>
On Fri, Nov 05, 2010 at 04:47:05PM +0800, chen_wang@trendmicro.com.cn wrote:
Show 14 quoted lines
> > > But when I put that command on cron job, even I run “. /etc/profile” and “. > > ~/.bash_profile” first, I can’t get correct format of output. > > > ------------------------------------------------- > > > Author: %aN <amit.shah@redhat.com>; Date: Wed Oct 20 13:45:43 2010 > > +1030 > > > 100.0% drivers/char/ > > > 1 files changed, 14 insertions(+), 3 deletions(-) > > > ------------------------------------------------- > > > > % has a special meaning in a crontab. See man 5 crontab. > > > > I warped this command in script and trigger script in crontab. > I think it's not the root cause, because %ae still works.
I notice that the only placeholder that is broken is %aN, which converts using the .mailmap file. Maybe something in your environment is preventing reading that file properly?
Can you show us the exact script you're calling from your crontab file? I'm wondering if it's something to do with being in the same directory.
-Peff