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:message-id:date:from:reply-to:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=QXTKPooM9cGBW6a8 RP1IloUV7Ffr9I0p5b0+YycfPdU2o1VGnopMgLYD9tMo2r4oP95EFOInhHI0KS5Y REjSRIMuSLgvqft0DLylJvoBHYmFJm86hIIY96xesQMy8hkZNpbzLNOZaGHx13Wq Rbt2t1VngN383K8vejtF1ql5vfo= 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:message-id:date:from:reply-to:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=default; bh=95x6jjOg+MDkTqXqE5dfdj QYXVM=; b=E+n8yDaqoabab7hd2dB4/P75KFcX4En4kKUb2koQBSW4MioOMFFkyy E8DI/4QoH40ySh7h//XAb/VJYporw1HUYf2/2JOb1tlDnZ6/2TVSjCA+XWG6DjZb JgfavJOx3mIT+y5QmSq+eH1APEqXndmFyLuK1/eAPUOzAWM0+F/mQ= 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-Virus-Found: No X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: vms173023pub.verizon.net X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=Pd9IXZlY c=1 sm=1 tr=0 a=Z9UJdt/jcW91Hd6r4aN9qw==:117 a=vP6ySPhpAh4A:10 a=N659UExz7-8A:10 a=w_pzkKWiAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=emO1SXQWCLwA:10 a=KBlaXSjZgbt8Kqx1LIUA:9 a=pILNOxqGKmIA:10 a=buB1NfXUTBUA:10 Message-id: <54FF11C8.4070305@cygwin.com> Date: Tue, 10 Mar 2015 11:46:16 -0400 From: "Larry Hall (Cygwin)" Reply-to: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Cron not working References: <5440CEFE64DE65479B2056BDE1CEA4511653B01A AT MARIA DOT win DOT idev DOT lan> In-reply-to: <5440CEFE64DE65479B2056BDE1CEA4511653B01A@MARIA.win.idev.lan> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 03/10/2015 09:48 AM, Stefan Schumacher wrote: > > Hello > > I am trying to set up a cron job to run a script every 10 minutes. I > have installed cron via the installer and configured it with cron-config > to run as a system service. > Mar 10 14:11:33 stefan-PC cron: PID 3408: `cron' service started > > This is stefan's crontab, generated with crontab -e. > */10 * * * * /cygdrive/c/Users/stefan/copy_from_fileserver > > According to /var/log/messages the cron job is executed correctly, but > no test file is generated in the directory. Calling copy_from_fileserver > from the command line works without complications and copies the > file from the server as it should. > > Mar 10 14:40:01 stefan-PC /usr/sbin/cron: PID 2340: (stefan) CMD (/cygdrive/c/Users/stefan/copy_from_fileserver) > > How can I get this working? First, we need to know what your script is doing and what your configuration is, both for cron and for Cygwin. Check out the problem reporting guidelines at the link below for details. > Problem reports: http://cygwin.com/problems.html Just a wild guess based on what you said so far, your script requires resources (paths, environment variables, permissions, etc.) that aren't available to the script when it runs. Keep in mind that the script isn't being run by your user and as a result, you can't assume that your user's environment exists when it runs. If your script assumes these things, it will fail. To solve this problem, you need to identify the needed resources and make sure they are available when the script runs. This may be as simple as running the crond service under your user's account (this means that the service can _only_ service your user's account though) or adding some needed environment to your script. -- Larry _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- 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