From owner-freebsd-questions Sun Mar 5 19: 3: 9 2000 Delivered-To: freebsd-questions@freebsd.org Received: from cytosine.dhs.org (cx272244-a.orng1.occa.home.com [24.1.177.149]) by hub.freebsd.org (Postfix) with ESMTP id 8794D37BBE1 for ; Sun, 5 Mar 2000 19:03:02 -0800 (PST) (envelope-from bhishan@cytosine.dhs.org) Received: (from bhishan@localhost) by cytosine.dhs.org (8.9.3/8.9.3) id TAA02466; Sun, 5 Mar 2000 19:03:07 -0800 (PST) (envelope-from bhishan) From: Bhishan Hemrajani Message-Id: <200003060303.TAA02466@cytosine.dhs.org> Subject: Re: run every 10 seconds In-Reply-To: <200003060121.TAA08866@ppp-207-193-2-190.kscymo.swbell.net> from Jim Bryant at "Mar 5, 2000 07:21:18 pm" To: kc5vdj@swbell.net Date: Sun, 5 Mar 2000 19:03:06 -0800 (PST) Cc: freebsd-questions@freebsd.org X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I get an error when trying to compile that. I don't know C at all... so if this is a stupid thing on my part, I apologize. This is the error: /var/tmp/ccpD24411.o: In function `main': /var/tmp/ccpD24411.o(.text+0x22): undefined reference to `exec' Thank you. --bhishan > In reply: > > I was wondering if you could schedule a program to run > > every 10 seconds. I tried to do this with cron, but as > > far as I know, you can only have it run once a minute. > > > > Please help. > > maybe something like this? > > int main(void) > { > . > . > . > while(1) > { > if (!fork()) return(exec("whatever")); > > sleep(10); > } > } > > -- > All opinions expressed are mine, if you | "I will not be pushed, stamped, > think otherwise, then go jump into turbid | briefed, debriefed, indexed, or > radioactive waters and yell WAHOO !!! | numbered!" - #1, "The Prisoner" > ------------------------------------------------------------------------------ > KC5VDJ - HF to 23cm KC5VDJ@NW0I.#NEKS.KS.USA.NOAM kc5vdj@swbell.net > IC-706MkII, IC-T81A, HTX-202, HTX-212, HTX-404, KPC3+, PK-232MBX Grid: EM28px > ------------------------------------------------------------------------------ > ET has one helluva sense of humor, always anal-probing right-wing schizos! > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message