From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 99296158086 for ; Mon, 13 Dec 2021 22:03:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8D63B2BC036; Mon, 13 Dec 2021 22:03:26 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8E655E0871 for ; Mon, 13 Dec 2021 22:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1639432992; bh=hOChFfcZp3fP+upnD0tytW3AcHkNYzLRkJGyrDi72YQ=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=GiqDL63XN545tyNgXBa/kDcESeRgBonPVavSdUG2rZMIjiffOXMRSOQKYsg1AuolE bsF7x4FMfymRy8mLSzOFY8UJ8X4XJu+DiItswhmwDVdsI48OXVwoPzSGT+Enp502hn QsdOmjkyotWqS7srOtbBnlSxrmcF1qWzeg5DJns4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from kern ([92.117.45.183]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N7zFj-1mR72p0axP-01508c for ; Mon, 13 Dec 2021 23:03:12 +0100 Date: Mon, 13 Dec 2021 23:03:10 +0100 From: Frank Steinmetzger To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Bug in run-crons? Message-ID: Mail-Followup-To: gentoo-user@lists.gentoo.org References: <0fa56046dbf46a92723f588f2b458deb53771c5c.camel@gentoo.org> <1e7ebc2410db0e42c7692f951c6614061d0004bb.camel@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="mNKxB7GFgfQnm3wy" Content-Disposition: inline In-Reply-To: User-Agent: Mutt 2.1.4; VIM - Vi IMproved 8.2 X-Provags-ID: V03:K1:mlFXW3M2sJrX/PLDY64DCzdNCFvYrN+shYcjCVfI+I/RUrTTamr nHr5m0+IK6GmCD2Q9KDXVuwTtW7CKkPT04XXSBqyTcXNe93XxC7XpYS8vxsqcnbEE41n1Q5 wkMLmdtlgFpbZtjZOF9e0jppXrGCIQDVuWsUYTm6sf2lzf5KqPjuDF1K8pr/le0WMzs+ENP NMZHVCqBbp8dLCelgvwWw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:bW/AZyZpqSs=:eI2/Md/6AA61LC7asfMLRZ yQg2irWVzqLcyexFoq9kYd2qZUVv5Z4xlDrIv8L0FuVtmq9kH5eBvk9vQ16T1yoRw10ifF0tN l9MvWU2SOWexgGmKRmMhVzGSSsOo0dGYqMiwAKmNm9qD0eaZhGrO3rR9pjMD00hI25MGU3goW xFDxFi5FVaoAKnfOVGs/C4d5NhpQH4OpVxRCqNI6R7+SJm2HZRFbje3JHIJ/40IiDxcsn70hz pVE/TswxgiiLhbP3CZyeb/62M99fKHQ/RJ1bC/LmlMWsWLRrBKKbL33Zm1laMYrAVu17GEA+N 4G7K2hWdOlEsuyMeRJfdfC9slZ4HjNnb/Pc3TXgSysng1QNzIAYsLyN3U61cwh7FmZXtPllgs 4yRu9tx4gy9I25eWMHat5LOBQJTVnlivXs4mJioZmytqzt0b3sU8Wrepe4on8XaI2+c8K3EKy WXfkKOdYuwg3Hb2A0KoSw7tONSlcwrFBRkQ8G4WDVHNEdvbs/UQV+xthf0dnBF21FKdBs4lW2 Zl3LoaukPNUf953IYuqi72qNDJ70HOX2+M/wBcMLLqxuP0GIQxVATEJYwkHXHidWj4JfAS1am K9KQaVwoK4jxSEVIPmuFmAzJ0tDTu5WM/0YojXrxX0VKhi6UmLMRksSAYMvwbDb6hAPjomKGz IgTXdhMYzk5vonl0UwfHja4D6Os1ZzWVkOQM/KANEi+7vCIwW1dQ2aX+c0YGCqxTeLPAyJd8J WeVlaGMIKRbLRe9iBYKWkvvqBhczXN5dFRDiD/1d5LXsaWrv4nfF1smqo6o6z7CieI8z9+SUa yUQR+T7yM4Aq5BcHWTdSHQ/oKcfuFm50hntvqpJcpQWQqCnDI0vas8o+Ungl3O83QPm9hTvEc TquqtcgA+JJWZ4oIZRRgnHC9IhhmM03KH7cNxJ8TG00JgWq8qvxJq46/qDCD0q7kJvvHUBbp8 vnqDst5cdBJ0565NJWkVPhK9up7J9saaUXu+3qXYCGm7XSYTUhutcHJtSk27edtB8Kvh4qosq 2UEXVoPSKeSuLZy1IBryJjYqtpgQfXE5vNW+u8DVOlK1KCJpkkiuz9HH0wy1NTebQQ== X-Archives-Salt: 4f91e1a4-bc11-432c-9958-f23bc2d194aa X-Archives-Hash: fe4e6f3eaf758326de839923af861a8e --mNKxB7GFgfQnm3wy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am Mon, Dec 13, 2021 at 04:54:30PM -0500 schrieb Rich Freeman: > On Mon, Dec 13, 2021 at 4:42 PM Michael Orlitzky wrote: > > > > On Mon, 2021-12-13 at 22:38 +0100, Frank Steinmetzger wrote: > > > > > > Well I *could* disable run-crons altogether and add entries to fcron= =E2=80=99s own > > > crontab which would run those scripts in /etc/cron.{hourly,daily,...} > > > instead. > > > > > > However, I like predictable times at which those jobs will run. Espec= ially > > > if one of them is a zfs scrub; the NAS is powered down for weeks, som= etimes > > > months. And when I power it up, it=E2=80=99s for a reason. And that r= eason usually > > > is not a scrub, which=E2=80=94at the current zfs fill level=E2=80=94t= akes 10=C2=BD hours. > > > > > > > Why choose fcron then? It sounds like you have the same rationale as I > > do: "no, I don't want to run the 4am backup job in the middle of the > > business day just because it wasn't run at 4am." Fair point. Fcron has a serialisation feature, so that for instance updatedb and mandb don=E2=80=99t run at the same time. Me kinda liky. > fcron is perfectly capable of running jobs at either set times or at > loosely-defined intervals that are compensated for if the machine is > off. Indeed, I can say "@monthly * 0 *" to run a monthly job (like the scrub) only at night. *pondering* > Systemd timers can also be set that way, and can also have > limits put on scheduling (daily nominally at 3AM but allowed between > 11PM and 5AM or whatever). Obviously the more expressive the crontab > equivalent is, the more you can tweak it to do what you want it to. I=E2=80=99ve gotten used to systemd on my Arch-based desktops. But the NAS = is still on good-ol=E2=80=99 openrc. :) > I'll also note that zfs scrubs checkpoint at shutdown and will > auto-resume where you leave off. That=E2=80=99s a nice bit of knowledge. > If they are involved multiple times > with the default options I think any attempt to scrub something that > is already being scrubbed is just a no-op. Obviously if you don't > want all that IO during the day you'll have to do something more > clever - you can instruct it to pause and resume so you could have a > couple of crontab entries and scripts to do just that. Or, since I am the only user of that system, I could go back to my previous way: just run the scrub manually every other month or so before I go to bed. Because then I know that nothing will interfere with it and it won=E2=80=99t interfere with anything else. --=20 Gr=C3=BC=C3=9Fe | Greetings | Qapla=E2=80=99 Please do not share anything from, with or about me on any social network. This message was written using only recycled electrons. --mNKxB7GFgfQnm3wy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEVbE9o2D2lE5fhoVsizG+tUDUMMoFAmG3wx4ACgkQizG+tUDU MMq1PA//aPfJ9mUZDRNwbNd2CMiXa+rQQy/PN6Gqr+TwahqIawC4OpIIykuaIRJH Xea9I9eVZz3u2ZXTKO+DU7Zw/574Nl1H+mky6Wi9q6SICmyhhjTWWJPfdgBtuFvV pDAUysTLFr/rHre7DmLFKNuKgPy0m7FqHq6l+QknLtePM8tiAXc5EmKNpJ6G4NWK EVBdq6m3bnAlZ5TZDRis583u/xeojLhsR7UAQR0XAfPLlownkiN9FhP3smhAnLov 9fPhYK7dHBj9VTmUXWJW6Y5eQP/id5JQfWzDgSwzzucK11RMH0pVVp6FgcrEOZIh je1xeHXhzcQsoHkzV7p/XmEUVelPFYC5Q6Qt1bDWmgJ6xJMm1LxUq8jinCOo32dd kBzh5Eav/WXE9B7UIiCSvxCtvMtyMOvUasO3Y33yKGJs+JU3HMtoIvRUgbfn1iM0 OPAVB0WKZ2L0LFmbrfJT8HUOmopQnpIyt0TPgOhWfNM3oZz25FZUkNQ5t3WV3r3Z ILBfH2G1H/kQ91te1t1I4nHAtUtSVlGjT4f+KOEIclNAtnpLXC8ddtUDyrf0brHy WlHPAhS6DMIWL6WMPeJuWTkqoW7Solxr3smMW6ZToj6b4e4viTHxWNOPddwtobNv f/pLu49bu8VP+hCM2gaFP5y8nhqIkS7X0aGNNsx26jgpPjaRTpI= =1HK3 -----END PGP SIGNATURE----- --mNKxB7GFgfQnm3wy--