From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id B2A001F5AE for ; Sun, 2 May 2021 06:49:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229673AbhEBGuV convert rfc822-to-8bit (ORCPT ); Sun, 2 May 2021 02:50:21 -0400 Received: from mail-ed1-f48.google.com ([209.85.208.48]:34456 "EHLO mail-ed1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbhEBGuU (ORCPT ); Sun, 2 May 2021 02:50:20 -0400 Received: by mail-ed1-f48.google.com with SMTP id i3so2756481edt.1 for ; Sat, 01 May 2021 23:49:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=khBKbs1fOHpGkNa+4R+wlaTUw9ewCA/IDyDpOi4AKK8=; b=av24plG1i8hmEYUN9ZJNNmatRT5m7Esba0ennybtnRUJWRYrfnnjxynvJI28xND+// j8eh6MlRdB71i9cfAZGe/dHXuQavzIGETlvbJym4boexOrOzQpenCt8Gs1zJ+7ixWSAT V91QSogExI2ExO15tUsxgmXTVfgel2Kaz5rzj8NMO/XaQBFVHTkxxm9DqjSCR0X+NmoE 9JC722s/nGMPt2i2AOXsu32ENkabnMO8dinzvENq87nB7Y5Nl5SXqJNmEWcfByn8E/CX 3CS8NbRfDHdBCtKjoepgtL4u5OTIX1BneazfKalVhQp8C4S6WH13KB5QcBPEmh/NHKoL iLyw== X-Gm-Message-State: AOAM532Yq31BrmjnWsyX1nZ6TpzP32DCTNMis6V3qgLwF3GIMVYfEKDx qPSVKftBRV0QTAyA9EPKZYAafbA2wroK5brJtLoHSnHJ2QI= X-Google-Smtp-Source: ABdhPJy0/sIsPbajbxx6WIjdusZjFptBVqj9oQMlxl+pyfrXMX1je1oxcciNQ8Fjj2OV9TFtEZA4br5wFN4qfA6Kt28= X-Received: by 2002:a05:6402:145:: with SMTP id s5mr13989376edu.221.1619938167624; Sat, 01 May 2021 23:49:27 -0700 (PDT) MIME-Version: 1.0 References: <20210501145220.2082670-1-lenaic@lhuard.fr> <81e77586-8e9a-44b8-bee6-94ecf1b60d12@gmail.com> In-Reply-To: <81e77586-8e9a-44b8-bee6-94ecf1b60d12@gmail.com> From: Eric Sunshine Date: Sun, 2 May 2021 02:49:16 -0400 Message-ID: Subject: Re: [PATCH] maintenance: use systemd timers on Linux To: Bagas Sanjaya Cc: =?UTF-8?B?TMOpbmHDr2MgSHVhcmQ=?= , Git List , Junio C Hamano , Derrick Stolee Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Sun, May 2, 2021 at 1:28 AM Bagas Sanjaya wrote: > On 01/05/21 21.52, Lénaïc Huard wrote: > > The existing mechanism for scheduling background maintenance is done > > through cron. On Linux systems managed by systemd, systemd provides an > > alternative to schedule recurring tasks: systemd timers. > > > > The main motivations to implement systemd timers in addition to cron > > are: > > * cron is optional and Linux systems running systemd might not have it > > installed. > > Supposed that I have Linux box with systemd and classical cron. Should > systemd timers be preferred over cron? The implementation in this patch unconditionally prefers `systemd` over `cron`. Whether that's a good idea is subject to question (as both brian and I mentioned in our reviews). > Nevertheless, because we are dealing with external dependency (systemd), it > should makes sense to enforce this dependency requirement when user choose to use > systemd timers so that users on non-systemd boxes (such as Gentoo with OpenRC) > don't see errors that forcing them to use systemd. If you scan through the patch itself, you will find that it is careful to choose the appropriate scheduler and not to spit out errors when one or the other scheduler is unavailable.