X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=Mu7K/U40hCsxLbDQ leYw49lyoB1bTYiS+IUwkHZ6to4aHDew9fAf9/9AgolyrXDXqLv81YHXwm8Fd1Zz S7wMmAuxbLFmxTFpz670Vk6l4I/qQ3jhuvWmirl8qqN2H36e4Tdl7efQnLcO/co7 mKsloX1JFpLP3zbyijQfz9O/1jE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=L8/+tWxXkBPNJfj2fEPtJs x9ZZo=; b=gpKRH5+6dd9CYV3wF4EUDQ0s36sst1SKwlPRb1zdDlVIytz3xFbiW8 khZbRYOe23aEchl96p2iBeeyclTaOKDDyauL2m2gyLe3aUOBxOMkK6nTaIiCGNC+ uPZPugh1wzWqKa8ufmbYHy9CyaUwviCRFOVu8NhUOj5s6Oc2cuoFM= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*UA:WOW64, H*u:WOW64, H*R:D*ca, H*Ad:D*ab.ca X-HELO: smtp-out-so.shaw.ca Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca Subject: Re: How to start and verify cron? To: cygwin AT cygwin DOT com References: From: Brian Inglis Openpgp: preference=signencrypt Message-ID: <61a6773b-5fe9-62e0-78ec-7684ee0d04b0@SystematicSw.ab.ca> Date: Wed, 10 Jul 2019 11:19:34 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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? > 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. > 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. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- 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