From owner-freebsd-questions Tue Jun 11 15:28: 9 2002 Delivered-To: freebsd-questions@freebsd.org Received: from cypress.adhesivemedia.com (cypress.adhesivemedia.com [207.202.159.72]) by hub.freebsd.org (Postfix) with ESMTP id 86FBB37B408 for ; Tue, 11 Jun 2002 15:26:56 -0700 (PDT) Received: from cypress.adhesivemedia.com (localhost [127.0.0.1]) by cypress.adhesivemedia.com (8.12.3/8.12.3) with ESMTP id g5BMQudq064271; Tue, 11 Jun 2002 15:26:56 -0700 (PDT) (envelope-from philip@adhesivemedia.com) Received: from localhost (philip@localhost) by cypress.adhesivemedia.com (8.12.3/8.12.3/Submit) with ESMTP id g5BMQtaP064268; Tue, 11 Jun 2002 15:26:56 -0700 (PDT) X-Authentication-Warning: cypress.adhesivemedia.com: philip owned process doing -bs Date: Tue, 11 Jun 2002 15:26:55 -0700 (PDT) From: Philip Hallstrom To: Lord Raiden Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Looking for help with Crontab event In-Reply-To: <4.2.0.58.20020611180826.0094ff00@pop.netzero.net> Message-ID: <20020611152510.A61460-100000@cypress.adhesivemedia.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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