On 11/10/2021 3:56 PM, Ævar Arnfjörð Bjarmason wrote: > > On Wed, Nov 10 2021, Derrick Stolee via GitGitGadget wrote: > >> From: Derrick Stolee <dstolee@xxxxxxxxxxxxx> >> >> In eba1ba9 (maintenance: `git maintenance run` learned >> `--scheduler=<scheduler>`, 2021-09-04), we introduced the ability to >> specify a scheduler explicitly. This led to some extra checks around >> whether an alternative scheduler was available. This added the >> functionality of removing background maintenance from schedulers other >> than the one selected. Note this last sentence. > I haven't tested, but isn't a smaller fix for this to just re-arrange > the array where we declare the methods to check to have "cron" come > after all the OS-specific ones, or at least after launchctl? > > I.e. we already have an ifdef to pick launchctl and never cron for OSX > on "start", so this is only for the case where we loop through the array > looking for something to select. > > That wouldn't work if that user can run cron, but can't use launchctl at > all, but in that case won't they be happy to get the prompt? Your suggestion doesn't work because this isn't about picking cron over launchctl, it's about disabling cron (and systemd or whatever is available) when launchctl was selected. Thanks, -Stolee