Skip site navigation (1)Skip section navigation (2)
Date:      11 Jun 2002 23:25:03 +0100
From:      Paul Richards <paul@freebsd-services.com>
To:        Lord Raiden <raiden23@netzero.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Looking for help with Crontab event
Message-ID:  <1023834304.10393.68.camel@lobster.originative.co.uk>
In-Reply-To: <4.2.0.58.20020611180826.0094ff00@pop.netzero.net>
References:  <4.2.0.58.20020611180826.0094ff00@pop.netzero.net>

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

--=-34ASI/z1a4Z0RXjfVAOT
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Tue, 2002-06-11 at 23:18, Lord Raiden wrote:
> 	Hi all.  I was fiddling around with something and came across an idea I=20
> wanted to try.
>=20
> 	I've got one machine that has a shell server on it that supplies access =
to=20
> some special stuff for our field techs.  I only need up and available=20
> between the hours of 4p - 12 midnight Thursday through Monday for any of=20
> our techs going out into the field.  I'm looking to setup a cron job that=
=20
> only fires on the hour starting at 4p for all jobs and every hour after=20
> that to cycle one of the programs that will be running, then have it shut=
=20
> down shell and all the other stuff at Midnight.
>=20
> 	I've thought of some ways to do this, but it requires I think personally=
=20
> too many entries to pull off.  Here's the basic list of programs that I=20
> need to run/cycle/kill on que at given times.
>=20
> 	SSH -> Start at 4pm, kill at midnight
> 	Spen -> Start at 4pm, cycle every hour, kill at midnight.
> 	Kvar -> Start at 4pm, kill at midnight.
> 	CvarSS2 -> Start at 4pm, cycle every 2 hours, kill at midnight.

You'd be better off doing this with one or two scripts, rather than lots
of separate cron entries i.e, one script that runs at 4pm and starts all
the processes and stores their PIDs somewhere, then another that's run
every hour from 4-12 and knows to cycle each process at the appropriate
time and then kill everything off at midnight. It could of course just
be one script that's run every hour.

--=20
Paul Richards                   | =20
FreeBSD Services Ltd            |  Pre-order your FreeBSD 4.6 DVD now!
http://www.freebsd-services.com | =20
http://www.freebsd-services.com |  Domain names and mail/web hosting.

--=-34ASI/z1a4Z0RXjfVAOT
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

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

iQEVAwUAPQZ4v3/5PEK9QuA3AQJYoQgAwtgURFknEL7T2kNl0iO2YWumDhv7vr6j
MhWdQe2S0nMQxmo96ik+s69mXtOlsag63bB18i6N0uROwgL6nz7wTbihN9A+gihG
jkk69DWAJgM7gNll72kndXzK59x5j+8RrD0MZD5ypEdwGFZAduNMuyw/kH/pMCFD
eo61R640XzhP0o/1HaBoQNdGC51KCTvXDyd/9O3mFL+Sr1y0vGOMpnueKWTrpqjw
Ss9PzVV2HYDyUCbDUAhuV2Gbmkb3LO77lNMDF+DhA5SCaj0cKyE91DmBmp2ab8Ff
3f9cOcElpKajQNiUOxQdnhcg9GeUAu3Ae57r/fnkkFuhFbQR2XBe3w==
=eLmT
-----END PGP SIGNATURE-----

--=-34ASI/z1a4Z0RXjfVAOT--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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