Received: from hekla.abc.se (hekla.abc.se [158.174.61.227]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 2A11B223AF4 for <~alpine/users@lists.alpinelinux.org>; Sat, 30 Aug 2025 19:29:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=default; bh=v2I3GSaisj G/Mi1QM61Mf5JhNMnb5h2G22jf8NE/JYg=; h=in-reply-to:references:subject: cc:to:from:date; d=abc.se; b=XQhGXMzoy8CBRATgBIVSzNd/CIqOKE8qk01hLJOiF gOHM8mK3HB+u4lhDIWTg+9dZbK/JsxauoPPywMrH22sW+c8QLi5cZn0BpOwnMgVG6ZeYDr QFIsXTJ53/ApD9LZC6hUtgq5cT9IdPkufH4FvfMC47niuzH6/wN28EbUnXIsWEjb89sHJg 5UfjkC7OrPjhMGYpOY1alKU/w0mlUBsjBfnvrmsAkmtK2LNJwm+ijdtNiCvHpXNwzmODK0 ZHLvykHXWh4VRp584bcEdKwNDJ3W89gEEkn3QXTLyow+ORr0iyy8Uw6nKCcnDRuiKqj7Ip mA/a0H39forUULiAFzU0w== Received: from eeyore.invalid (94-255-240-124.cust.bredband2.com [94.255.240.124]) by hekla.abc.se (OpenSMTPD) with ESMTPSA id cddffeec (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 30 Aug 2025 21:29:48 +0200 (CEST) Date: Sat, 30 Aug 2025 21:29:46 +0200 From: Andreas =?utf-8?B?S8OkaMOkcmk=?= To: Wolfgang Klein Cc: ~alpine/users@lists.alpinelinux.org Subject: Re: Problem with crontab Message-ID: Mail-Followup-To: Wolfgang Klein , ~alpine/users@lists.alpinelinux.org References: <9e46853a-fcdd-5673-d243-65c244026117@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9e46853a-fcdd-5673-d243-65c244026117@web.de> On Sat, Aug 30, 2025 at 08:58:05PM +0200, Wolfgang Klein wrote: > Hello, > > in my crontab there are these two entries: > > > 7,37 0-7,18-23 * * 1-5 command > 7,37 * * * 6,7 command > > > "Command" needs to be executed every 30 minutes, *except* during office > hours. That's why there are two lines: one that's to be executed Monday to > Friday, and one on Saturday and Sunday. > > On Ubuntu, this has been working perfectly as expected for years now. On > Alpine, the DOW field seems to be ignored somehow: "command" is executed > every 30 minutes on each day of the week! It seems that the second call is > executed regardless of the DOW entry. > > Does cron on Alpine need a different syntax? Does it not know about the DOW > option? > > Thanks in advance for any help! > > > Regards, > > Wolfgang > > The busybox cron does not understand "7" as a valid day of the week. The Vixie cron daemon allows for using either "0" or "7" as Sunday, but busybox cron only allows "0" for Sunday (as per POSIX). So you need to change your second line to: 7,37 * * * 6,0 command I ran into this myself a while ago and decided to look deeper into the busybox cron source code to confirm this. See my issue and resolution here: https://unix.stackexchange.com/questions/783517 -- Matti Andreas Kähäri (Kusalananda) Uppsala, Sweden .