for anybody who cares, here is the working way I came up with.

SHELL=/bin/bash
YESTERDAY="date +%Y%m%d -d yesterday"
* * * * * root echo $($YESTERDAY)


I'm not sure if that works in sh or just bash so I put the shell
variable just to be safe.


On Tue, 2003-02-04 at 06:38, Jeff Bearer wrote:
> I'm attempting to set some variables with the output of 'date' in my
> crontab but for some reason they are not being evaluated.
> 
> 
> YESTERDAY=$(date +%Y%m%d -d yesterday)
> * * * * * root echo $YESTERDAY
> 
> When cron runs that $YESTERDAY is set to "date +%Y%m%d -d yesterday"
> Why doesn't this work, and how do I get it to work?
> 
> 
> -- 
> Jeff Bearer, RHCE
> Webmaster, PittsburghLIVE.com
> Winner 2002 Eppy Award, Best U.S. Newspaper Website
> 
> 
> 
> -- 
> redhat-list mailing list
> unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
> https://listman.redhat.com/mailman/listinfo/redhat-list
-- 
Jeff Bearer, RHCE
Webmaster, PittsburghLIVE.com
Winner 2002 Eppy Award, Best U.S. Newspaper Website



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to