Date: Tue, 15 Apr 1997 23:14:17 -0400 From: Shawn Carey <smc@servtech.com> To: Alex Belits <abelits@phobos.illtel.denver.co.us> Cc: "Daniel O'Callaghan" <danny@panda.hilink.com.au>, freebsd-hackers@freebsd.org Subject: Re: crontab question Message-ID: <33544409.41C67EA6@servtech.com> References: <Pine.LNX.3.95.970415175333.9632B-100000@phobos.illtel.denver.co.us>
next in thread | previous in thread | raw e-mail | index | archive | help
Alex Belits wrote: > > On Tue, 15 Apr 1997, Shawn Carey wrote: > > > [...] > > It seems to me that what I need is for cron to logically AND the > > day-of-week and day-of-month fields instead of using logical OR. Is > > there any low down, dirty way to simulate this (short of hacking cron)? > > 0 14 1-7 * * root date | grep Sun >/dev/null && mail -s "cron test" root > > and last Sunday: > > 0 14 22-31 * * root [ `date|cut -f3 -d' '` = `cal|cut -f1 -d' '|grep -v ^\$|tail -1` ] && mail -s "cron test" root > Wow. That's exactly what I meant to say, thanks for the precise translation from english to sh(1)! > -- > Alex -Shawn
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?33544409.41C67EA6>