[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: date '+%a %b %e %Y' does not work from within crontab.



Sven Hoexter <sven@telelev.net> writes:

> On Fri, Mar 01, 2002 at 11:19:14PM -0600, DvB wrote:
> > Cameron Kerr <cameron.kerr@paradise.net.nz> writes:
> > > On Fri, 1 Mar 2002, Shaul Karl wrote:
> 
> Hi,
> 
> > > >Should
> > > >
> > > >    date '+%a %b %e %Y'
> > > >
> > > >work from within crontab?
> > > 
> > > It likely won't with Vixie Cron. IIRC, Vixie Cron uses the % character
> > > as a newline/comment. Here's the relevant part from crontab(5)
> > 
> > To tell the truth, I just had the same problem on a solaris server at
> > work... my process didn't produce any logs for a few days until I went
> > to check and realized what was going on. I wouldn't think solaris used
> > vixie, but I could be wrong. I'll have to check the man page on Monday.
> > 
> > If anyone knows how to fix this, I'd love to find out too :-\
> But your stuff in a short script and execute the Script via cron.
> 

I was hoping not to have to do it that way. I already do that in order
to set up the environment for perl scripts and it just feels like a
kludge to me... looks like that's the only way though. Oh well.



Reply to: