www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 957943858410 |
DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; |
s=default; t=1684878301; | |
bh=oZLCjfR0EdSsdp9qS+diPAZmKKZsFWElgw6rnGq7oRs=; | |
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: | |
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | |
From; | |
b=WNLu4fIYFWMgVV8zInAubi8XIvb2y4wR5g3Y0EMVuo5Bmt9BbiGZeWloHNN90PzHb | |
bzs0Wq/TWGHUMadvecEpGKoInDQL3N3zD79bh94f532D0RTX2bd2EvYVjVWEpXF+4Y | |
QWCKoXXM2YsKAt3Jc3Ccz92h0wnyNupq23bURsWU= | |
X-Original-To: | cygwin AT cygwin DOT com |
Delivered-To: | cygwin AT cygwin DOT com |
DMARC-Filter: | OpenDMARC Filter v1.4.2 sourceware.org 77F793858D35 |
X-Authority-Analysis: | v=2.4 cv=XZqaca15 c=1 sm=1 tr=0 ts=646d33cb |
a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17 | |
a=IkcTkHD0fZMA:10 a=iKh5lrgnnPNa818H3d0A:9 a=QEXdDO2ut3YA:10 | |
Message-ID: | <7018868f-be47-59bf-0174-8f32307579fc@Shaw.ca> |
Date: | Tue, 23 May 2023 15:44:42 -0600 |
MIME-Version: | 1.0 |
User-Agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 |
Thunderbird/102.11.0 | |
Subject: | Re: cron: trying and totally failing to run a simple cron job |
To: | cygwin AT cygwin DOT com |
References: | <58cf0c8a-9f49-fb2d-a2ff-f9985f69e157 DOT ref AT att DOT net> |
<58cf0c8a-9f49-fb2d-a2ff-f9985f69e157 AT att DOT net> | |
Organization: | Inglis |
In-Reply-To: | <58cf0c8a-9f49-fb2d-a2ff-f9985f69e157@att.net> |
X-CMAE-Envelope: | MS4xfB2D1scvcJQkuh/g16sQfh+ZYZOdZ0FywW9Ap2rjLABcouOqn8QvZDobpdbNxW/DYikaJKglmKmqVvPOK0kYmHKAfz/rHVC0NNhgyPBo6ktsXmV5KZGC |
skrN4TOqTqxQbA5LcxR0Oyi09XICRkyjbGWRsmypLhKCWHfwp6kQ8msHI8+5pSqd88vtE8KhB2rvACONdRutOToN6P2c8MzXBuY= | |
X-Spam-Status: | No, score=-3.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, |
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, | |
RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, | |
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 | |
X-Spam-Checker-Version: | SpamAssassin 3.4.6 (2021-04-09) on |
server2.sourceware.org | |
X-BeenThere: | cygwin AT cygwin DOT com |
X-Mailman-Version: | 2.1.29 |
List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com> |
List-Unsubscribe: | <https://cygwin.com/mailman/options/cygwin>, |
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe> | |
List-Archive: | <https://cygwin.com/pipermail/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-request AT cygwin DOT com?subject=help> |
List-Subscribe: | <https://cygwin.com/mailman/listinfo/cygwin>, |
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe> | |
From: | Brian Inglis via Cygwin <cygwin AT cygwin DOT com> |
Reply-To: | cygwin AT cygwin DOT com |
Cc: | Brian Inglis <Brian DOT Inglis AT Shaw DOT ca>, Jonathan Clark <jonathan AT att DOT net> |
Errors-To: | cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com |
Sender: | "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com> |
X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id 34NLjQC5024294 |
On 2023-05-23 13:46, Jonathan Clark via Cygwin wrote: > First off, many thanks to everyone who is putting in time and effort in making > cygwin as wonderful as it is. > > I'm trying to get what I think is a simple cron job working. So far all I've > gotten is frustrated and confused. I'm sure I'm doing something stupid (probably > more than one thing), but I don't know what. At this point I have tried many > different twiddles and fiddles and so on, with no positive results. Any help > gratefully accepted. > > I am familiar with cron and crontabs on various flavours of UNIX, but this is my > first attempt at getting a cron job working on cygwin. > > I have DLed the cron package and gotten it running (possibly wrongly...). > > There are no cron.allow nor cron.deny files that I can find. > > I have set up a crontab which looks correct to me. I have tried many variants of > the actual command - adding a specific shell invocation (having read somewhere > that this needs to be a .exe file). The target script works just fine when > invoked by hand. I have ensured that the crontab file is written in UNIX format. > I have messed around with file permissions so that the target script is not > writable, even by me. > > However, nothing works. Either: > > a) nothing is ever invoked - cronevents shows that the new crontab is loaded, > but there's nothing there which shows that the specified command is ever run; > > OR > > b) I get a gnomic message about the crontab being UNSAFE. > > I have a sneaking suspicion that the space in my Windows username may be the > cause of the UNSAFE. > > Along the way I have fallen over various other curiosities. > > 'crontab -u' just says "must be privileged", even though I'm running it from an > Administrator account. > > cron-config talks about using 'passwd -R' as an option, but when I try this all > I get is: > "Storing password failed: Function not implemented" which is unhelpful. > > Apart from exhaustive search, there doesn't seem to be any way to search the > cygwin mailing list archives - is there such a facility hidden somewhere? > > Any help appreciated! cronbug.txt attached Hi JC, You do not appear to be running cron! Did you set up by running `/usr/sbin/cron-config` from an elevated admin shell and starting with the default answers? I would avoid trying `crontab -u USER` under Cygwin as ideas of admin don't match. I or config script created empty /var/cron/cron.deny to allow all users (me) to use cron. I started off using `crontab -e` and `crontab -l > ~/$USER.crontab` to update and save, but now just edit ~/$USER.crontab then `crontab ~/$USER.crontab` to reload. In my crontab I set: PATH=/usr/local/bin:/home/$LOGNAME/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH MAILTO=...@... and never try running anything but non-elevated Cygwin scripts and commands. I also run cygserver, and syslog-ng with some tweaks, to avoid dealing with Windows event logs. [To run elevated Cygwin or Windows scripts and commands, I use Windows Scheduled Tasks with the SYSTEM account, whether logged in or not, with highest privileges, running Windows %CYGWIN_ROOT%\bin\sh ... with script args or any other command, making no assumptions about any current directory or user mounts.] -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |