Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Oct 2003 16:39:29 +0100
From:      Matthew Seaman <matthew@cryptosphere.com>
To:        Odhiambo Washington <wash@wananchi.com>, Free BSD Questions list <freebsd-questions@freebsd.org>
Subject:   Re: complex crontab query
Message-ID:  <20031007153929.GE80886@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <20031007145347.GB49707@ns2.wananchi.com>
References:  <20030930164957.GL59342@ns2.wananchi.com> <20030930180743.GA54438@happy-idiot-talk.infracaninophile.co.uk> <20031007145347.GB49707@ns2.wananchi.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--o0ZfoUVt4BxPQnbU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Oct 07, 2003 at 05:53:47PM +0300, Odhiambo Washington wrote:
> * Matthew Seaman <m.seaman@infracaninophile.co.uk> [20030930 21:08]: wrot=
e:

> >   23 11 * * Thu   [ $(date +%d) -lt 8 ] && your_script

> How does that differ with the following?
>=20
> 23 11 * * 4     if [ `date +\%d` -le 7 ]; then /path/to/my/command; fi

TIMTOWTDI.

Both lines should have the same effect overall, although I neglected
to escape the % sign in what I wrote, which is not a good move in a
crontab file.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--o0ZfoUVt4BxPQnbU
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQE/gt4xdtESqEQa7a0RArluAKCDZos46Jd7NYVOulXMcEpOe1FbbgCeMXw6
iw5ioh1KGZgxlQxCNfu/Dsg=
=V9Qo
-----END PGP SIGNATURE-----

--o0ZfoUVt4BxPQnbU--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031007153929.GE80886>