From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 25 07:31:15 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1652E106566B for ; Fri, 25 Nov 2011 07:31:15 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 9987E8FC0C for ; Fri, 25 Nov 2011 07:31:14 +0000 (UTC) Received: by wwe5 with SMTP id 5so1419171wwe.31 for ; Thu, 24 Nov 2011 23:31:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-disposition; bh=8qmUZkIrZWWcWbPZwpcpgupQwCi4gleOJ5p9wTxWOLE=; b=UafKBt4uOwTAdUclpmQfbUYDCnpRFwVShXQ69C0LuPIxmm7kLwGTqe1gRGKN+tUuRI xkxmTCmTMaWjSBiuhMuV2nIbgdfqgxna+hgyXG+U71HiAOmj+q2OiDSRVRfsHBeCiQtb 7Kbh//1t0E7Lw98RFksCHaLve9tLLBogSBh50= Received: by 10.180.19.42 with SMTP id b10mr39038297wie.39.1322204575274; Thu, 24 Nov 2011 23:02:55 -0800 (PST) Received: from DataIX.net (ppp-21.79.dialinfree.com. [209.172.21.79]) by mx.google.com with ESMTPS id fw16sm26838638wbb.13.2011.11.24.23.02.51 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Nov 2011 23:02:54 -0800 (PST) Sender: Jason Hellenthal Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id pAP72hNo010117 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 25 Nov 2011 02:02:43 -0500 (EST) (envelope-from jhell@DataIX.net) Received: (from jhell@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id pAP72fvt010116 for hackers@FreeBSD.org; Fri, 25 Nov 2011 02:02:41 -0500 (EST) (envelope-from jhell@DataIX.net) Date: Fri, 25 Nov 2011 02:02:41 -0500 From: Jason Hellenthal To: hackers@FreeBSD.org Message-ID: <20111125070241.GA7915@DataIX.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline Cc: Subject: cron(8) mis-feature with @reboot long after system startup X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2011 07:31:15 -0000 --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List, When using @reboot with cron you expect your proccesses to always start when the system boots up and only when the system boots. But long after the system in question had been booted, my @reboot processes ran again! after a (/etc/rc.d/cron restart). This is normally fine and dandy until one of your @reboot jobs needs to contain a process that purges files "files that are already in use by a running daemon since the system has not rebooted" and becomes hazardous. So with that said... is there a way we could actually make this run @reboot only ? Compare the system boottime (kern.boottime) to the current time and if it is greater than ?5 minutes? do not run on any @reboot's ? or add yet another extension @boottime so it does not throw off current functionality ? Surely I could modify the scripts which do this but I find it unproductive and counter intuitive for the need to explain that @reboot means "When cron is restarted" even though the name means something completely opposite. Regards & Happy Thanks Giving. --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJOzz2QAAoJEJBXh4mJ2FR+jo4H/0pJ5OFg7JsUbu2hMw5tm5xE yLt2eMIiPiaM2PEOTBA1eo0iMF48U2BQhA5DIkAWEwO3zIMrj/HjVbOW7NT83Y7z 5MLjIWZGZmaWqlE7chlFpnQNAgLwtnzr9AljXggs9j7WH9uPYkNOoZc7Ybm0lwSe 6qEPaLc1F/IYw7FNyuOJlkjmAydDY0BBks4NyzlQB1lLAAmC2cijelpJWK3XwNmx NfOgHxCscW7C1ZDLGwCzKKHWhl6ibF+HJ/yeOCYwBs+N+p3yXQmTfzoXzxq7+Idb 3jHNsx4YZkkmyM/2/6vxPajpJxPwc+C5PcX7F2YsIx4ixxzTtzUWLrL2GLr7hTk= =P9LA -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM--