From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114040 invoked by alias); 11 Jul 2019 21:20:29 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 114027 invoked by uid 89); 11 Jul 2019 21:20:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Received:9799, H*c:alternative, posts X-HELO: mail-ed1-f51.google.com Received: from mail-ed1-f51.google.com (HELO mail-ed1-f51.google.com) (209.85.208.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Jul 2019 21:20:19 +0000 Received: by mail-ed1-f51.google.com with SMTP id i11so7280777edq.0 for ; Thu, 11 Jul 2019 14:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=6jmkQn0AyiscEFlQ53sguDOMFXXuI7tYKFUHjy0PkxY=; b=fshvjeRQ16Fw1hKI7+j2kL0rwv4wPty4UjcOlB1fU1ik5WSjoxk/rjBJbszf/MyW4v jQScTj8qfaZmUMcbOB7WqrgjOgTusPtfJ5rWuFNDkYMw5z3LADkOs9SlZYTN1yT34dN1 jm/CmDeYozDZzX+U8s35HANCFuH4INAf+dGJv2XtJ4fsLby4mXmfdchiDEAV53Jzh7VD rbXLYpDjaMgu+dLvluPvaNfOL3WZWvu8QGNeF4faOKA+mQYoOtwUb8cj4YY4eWXYtlwU d2bzQfFFkg0zDWvS53k7uFXT4eiDXYq/2FHkGcwyP6j8Q+3srikZ9D2vW2bsLPxXtKIq +Jdg== MIME-Version: 1.0 References: <61a6773b-5fe9-62e0-78ec-7684ee0d04b0@SystematicSw.ab.ca> <74357359-436a-0ead-f7bc-b288572d6cc3@SystematicSw.ab.ca> In-Reply-To: From: David Karr Date: Thu, 11 Jul 2019 21:20:00 -0000 Message-ID: Subject: Re: How to start and verify cron? To: Brian.Inglis@systematicsw.ab.ca, The Cygwin Mailing List Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-07/txt/msg00089.txt.bz2 On Thu, Jul 11, 2019 at 12:56 PM David Karr wrote: > It's curious that when I bring up the default "Packages" view, filtering > for "syslog-ng" doesn't find anything. I had to switch to the Categories > view, and then filtering for that found it. > > On Wed, Jul 10, 2019 at 4:04 PM Brian Inglis < > Brian.Inglis@systematicsw.ab.ca> wrote: > >> On 2019-07-10 16:15, David Karr wrote: >> > On Wed, Jul 10, 2019 at 10:20 AM Brian Inglis wrote: >> > On 2019-07-10 10:55, David Karr wrote: >> > > I've checked the user guide and the FAQ, and I can't find any >> information >> > > about how to start cron and verify that it's working. I found >> other blog >> > > posts on other sites, but some of them are old. >> > >> > Did you run service setup script /bin/cron-config to set up the >> service? >> > When I ran that now, it says "Cron is already installed as a service >> under >> > account ...", so I assume that means that I did. >> > > I had installed cron, and I thought it was working, but now I >> think that it >> > > is not. If I edit "~/crontab" and then run "crontab -l", it >> lists the >> > > changes I've made to jobs, so at least that is working. The real >> job I >> > > have didn't appear to be doing what it was supposed to be doing, >> so I added >> > > a new trivial job that just appends output from "date" to a file >> in my >> > > homedir, and after the scheduled time of the job, the file was >> not created. >> > >> > Messages from cron and other active services should be visible in >> the Windows >> > application event log if you have not set up a syslog service. >> > I went through it, but I didn't see any indications of issues with >> cron. I'm >> > not sure what to look for, or where in the event log interface. >> > > This is the additional job I added: >> > > >> > > 40,42,44 * * * * date >> /home//date.txt >> > > >> > > I did find a "/var/log/cron.log", but it is empty, and the >> modtime is from >> > > a few months ago. >> > > >> > > One blog post I found talks about running "cygrunsrv -I cron -p >> > > /usr/sbin/cron -a -D". I just did this, and it reports "The >> specified >> > > service already exists." >> > > >> > > This is my uname -a output: >> > > >> > > CYGWIN_NT-6.1 ... 3.0.3(0.338/5/3) 2019-03-09 19:12 x86_64 >> Cygwi >> > For a more Unix like and self contained Cygwin approach, install >> syslog-ng, run >> > service setup scripts /bin/cygserver-config /bin/syslog-ng-config >> > /bin/cron-config, add service dependencies to start up in that >> order, and you >> > should see cron messages in /var/log/syslog if you run elevated: >> you can also >> > run chmod elevated to make /var/log/syslog world readable, or >> setfacl to add >> > user or group read ACLs. >> > How do I add service dependencies to start up in a particular order? >> >> In an elevated cmd or bash shell: >> elevated > OR # sc config syslog-ng depend= cygserver >> elevated > OR # sc config cron depend= syslog-ng/cygserver >> N.B. the "=" is part of each keyword; multiple service dependencies are >> separated by "/". >> > After doing all of this, I still can't get cron jobs to work, and I can't get any info on why. This is the current output from "crontab -l": ---------------- # DO NOT EDIT THIS FILE - edit the master and reinstall. # (crontab installed on Thu Jul 11 14:13:09 2019) # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $) 0 0,12 * * * find /tmp/.logcache/ -type f -mtime +6 -exec rm {} \; 14,15,16,17 * * * * date >> /home/dk068x/date.txt ---------------- I've tried editing that last one and changing the minutes to include upcoming minutes, and then after those minutes, I check the results, and there are none. Nothing in cron.log or syslog-ng.log. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple