Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jun 2002 15:26:55 -0700 (PDT)
From:      Philip Hallstrom <philip@adhesivemedia.com>
To:        Lord Raiden <raiden23@netzero.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Looking for help with Crontab event
Message-ID:  <20020611152510.A61460-100000@cypress.adhesivemedia.com>
In-Reply-To: <4.2.0.58.20020611180826.0094ff00@pop.netzero.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Why not add a cron entry for say "master-script.sh" that runs every hour
from 4pm - midnight thursday through monday... and in that script do some
date/time checks and do whatever you need to do in there...  something
like:

if hour is 4pm then
	start a bunch of stuff
else if hour is midnight
	kill a bunch of stuff
else
	cycle some stuff, but not other stuff
end

-p

On Tue, 11 Jun 2002, Lord Raiden wrote:

> 	Hi all.  I was fiddling around with something and came across an idea I
> wanted to try.
>
> 	I've got one machine that has a shell server on it that supplies access to
> some special stuff for our field techs.  I only need up and available
> between the hours of 4p - 12 midnight Thursday through Monday for any of
> our techs going out into the field.  I'm looking to setup a cron job that
> only fires on the hour starting at 4p for all jobs and every hour after
> that to cycle one of the programs that will be running, then have it shut
> down shell and all the other stuff at Midnight.
>
> 	I've thought of some ways to do this, but it requires I think personally
> too many entries to pull off.  Here's the basic list of programs that I
> need to run/cycle/kill on que at given times.
>
> 	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.
>
> 	I also need to make sure that none of these programs are started either
> Tuesday or Wednesday since this server is busy doing other things those
> days and techs should only be logging into the Vlan through VPN to do
> remote maintenance or get info off the lan that they need, etc.
>
> 	I realize it's kind of a weird setup, but it's worked before this just
> fine.  Can anyone give me a general shakedown on how to do this as easily
> as possible?  Thanks.  I understand cron fairly well, but I'm trying to do
> this in the simplest manor possible, so any help is welcome.  Thanks.
> - The Raiden Knows
>
> "Remember amateurs built the ark  -- professionals built the Titanic." -
> Unknown
>
> "Just when you think you have life figured out and all is going well, watch
> your step, for you are about to fall." - Ancient Proverb
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>



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?20020611152510.A61460-100000>