delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/07/28/06:35:37

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:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=wVQad9bLdmhD1Cqd
nzx8GYvbVVUvLn4ZBmbw6jVhy5SVjB1QMQGcn2bMeVmwsKd82YmTRZQxAkTs/SNX
6GWI+t5922W//Sil05T31CsAPYya6HVjGjWDbMug58dHDupkWENcWmQ2N1ay+3/t
NaSvmZRNJX1bFFYz6SCBnOkHhqE=
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:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=4SMZ8rrBgCOXmR2B/fnBMd
8V0AM=; b=FncFKLfx+OySlV8Mh4RK5c/mkc628HY92U8hlZaoFQEh/9bvmGpawS
/kYGSQh9Lzv6gccdyhWu3Fb72LCoWKlDZEwrAy/AbGM7CVvm8d6JeLq6iDy+mFtp
Dp1meqirYa8/Cg+lSzK7Ca09VDc+t55ai+tdwhAO14mQXM9CcS/gs=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=2.0 required=5.0 tests=BAYES_50,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=H*UA:Bat!, H*x:Bat!, H*M:yandex, H*F:D*yandex.ru
X-HELO: forward4p.cmail.yandex.net
Authentication-Results: smtp3m.mail.yandex.net; dkim=pass header.i=@yandex.ru
X-Yandex-Suid-Status: 1 0,1 0
Date: Thu, 28 Jul 2016 13:26:30 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <5410152758.20160728132630@yandex.ru>
To: Peder Sverdrup <psverdrup AT yahoo DOT com>, cygwin AT cygwin DOT com
Subject: Re: Can a .sh script stored in c:\scripts\ (Windows part of filesystem) be run from crontab?
In-Reply-To: <1862051364.5309945.1469633495642.JavaMail.yahoo@mail.yahoo.com>
References: <1862051364 DOT 5309945 DOT 1469633495642 DOT JavaMail DOT yahoo DOT ref AT mail DOT yahoo DOT com> <1862051364 DOT 5309945 DOT 1469633495642 DOT JavaMail DOT yahoo AT mail DOT yahoo DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes

Greetings, Peder Sverdrup!

> I have my own backupscript, lets call it "bup.sh". It is stored on the
> c-drive, in the directory c:\scripts\.
> When I open the cygwin terminal I can run the script manually. But if I
> include it in my crontab, it does not run.
> If I copy the script to /home/myuser/myscripts/ I can run it from the
> cygwin terminal, and it also runs from crontab.

> Is it not possible to run scripts stored on "the Windows part of the filetree" from crontab?
> The crontab entries are:
> 10  14  *  *  *  /cygdrive/c/scripts/bup.sh
> 20 14  *  *  *  /home/myuser/myscripts/bup.sh

> When I run the script manually, I navigate to the folder where it is stored and do
> ./bup.sh &

Run it as sh -x .../script and see what it does in each case.
Most likely you are missing something simple.


-- 
With best regards,
Andrey Repin
Thursday, July 28, 2016 13:25:20

Sorry for my terrible english...


--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019