Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jul 2007 13:03:33 -0500
From:      Josh Paetzel <josh@tcbug.org>
To:        freebsd-questions@freebsd.org
Cc:        Dave <dmehler26@woh.rr.com>, Duane Hill <d.hill@yournetplus.com>
Subject:   Re: cron job every 5 hours
Message-ID:  <200707131303.36618.josh@tcbug.org>
In-Reply-To: <20070713165535.A43805@duane.dbq.yournetplus.com>
References:  <000f01c7c56d$da44d640$0200a8c0@satellite> <20070713165535.A43805@duane.dbq.yournetplus.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
--nextPart1228963.Nmo7T5k2GZ
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Friday 13 July 2007, Duane Hill wrote:
> On Fri, 13 Jul 2007 at 12:50 -0400, dmehler26@woh.rr.com=20
confabulated:
> > Hello,
> >   I want to run an updater script, every 5 hours and x minutes. I
> > thought to use:
> >
> > minute 5 * * * root path/to/scriptname
>
> crontab(5):
>    ...
>    Steps are also permitted after an asterisk, so if you want to
> say ``every two hours'', just use ``*/2''.
>    ...
>
> So, my guess would be:
>
> minute */5 * * * root path/to/scriptname
>

Sort of, that would run the cronjob at midnight, 5am, 10am, 3pm, and=20
8pm so there would be one interval where it runs at 4 hours.

The real method if it's imparitive to run it every 5 hours would be to=20
set up a cronjob for each day of the week, rotating by one hour.

minute 0,5,10,15,20 * * 0
minute 1,6,11,16,21 * * 1
minute 2,7,12,17,22 * * 2
and so on and so forth


=2D-=20
Thanks,

Josh Paetzel

--nextPart1228963.Nmo7T5k2GZ
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQBGl754JvkB8SevrssRAphCAJ4idx634Qv78gXGBf7rkPVawaqKAwCePvXI
L0PeoDxnvE/7IZqSbIzY6iE=
=ScZG
-----END PGP SIGNATURE-----

--nextPart1228963.Nmo7T5k2GZ--



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?200707131303.36618.josh>