From owner-freebsd-questions Sun Mar 5 17:22: 0 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mta4.rcsntx.swbell.net (mta4.rcsntx.swbell.net [151.164.30.28]) by hub.freebsd.org (Postfix) with ESMTP id 1CF3837B9C0 for ; Sun, 5 Mar 2000 17:21:58 -0800 (PST) (envelope-from jbryant@ppp-207-193-2-190.kscymo.swbell.net) Received: from ppp-207-193-2-190.kscymo.swbell.net ([207.193.2.190]) by mta4.rcsntx.swbell.net (Sun Internet Mail Server sims.3.5.1999.09.16.21.57.p8) with ESMTP id <0FQZ002TJ7RSQC@mta4.rcsntx.swbell.net> for freebsd-questions@freebsd.org; Sun, 5 Mar 2000 19:21:31 -0600 (CST) Received: (from jbryant@localhost) by ppp-207-193-2-190.kscymo.swbell.net (8.9.3/8.8.5) id TAA08866; Sun, 05 Mar 2000 19:21:26 -0600 (CST) Date: Sun, 05 Mar 2000 19:21:18 -0600 (CST) From: Jim Bryant Subject: Re: run every 10 seconds In-reply-to: <200003052349.PAA01127@cytosine.dhs.org> To: bhishan@cytosine.dhs.org (Bhishan Hemrajani) Cc: freebsd-questions@freebsd.org Reply-To: kc5vdj@swbell.net Message-id: <200003060121.TAA08866@ppp-207-193-2-190.kscymo.swbell.net> MIME-version: 1.0 X-Mailer: ELM [version 2.4ME+ PL32 (25)] Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Windows: R00LZ!@# MS-Winbl0wz DR00LZ!@# X-files: The truth is that the X-Files is fiction X-Republican: The best kind!!! X-Operating-System: FreeBSD 4.0-CURRENT #8: Sat Oct 30 00:56:56 CDT 1999 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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