delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/07/27/11:32:04

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:to:message-id:subject
:mime-version:content-type:content-transfer-encoding:references;
q=dns; s=default; b=lg2mg4lB8BFwP+6+LCc/BhnAiiOOmzEFddUhbL7oY4R
cwv8sIJdavXcAD7ID4NrXZ3BweSwDrjzo1+4XMDm/q3lNIjLB9mVlm6GA7f/0oAV
0epRbj0jdTskmTVuojYaZODQf2ZJHUFvamERkA6we1EgDxxKckxQjiZHNX9qc9bA
=
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:to:message-id:subject
:mime-version:content-type:content-transfer-encoding:references;
s=default; bh=ReaiS1fjJmxpMt/AOgkVrbqwiq0=; b=Eh2RMciVebnHvUNQh
+IN/TP1s7n4iMbAUdg8k1QKNDpPlOgGY+oN1Vu6iRq2gS7rtBSsvbzjmLDiuwFcA
y5+bESrU4H4or/YCqU0yoqolApfrrg1DzgBR7DGTKfHFC28ZAmCtwqdx+hfXJLiJ
yICyUPM0GlHjE+x5JzMI1VIvB4=
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=-1.7 required=5.0 tests=AWL,BAYES_20,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:jws1001, H*R:D*yahoo.com, H*F:D*yahoo.com, H*M:JavaMail
X-HELO: nm22-vm4.bullet.mail.ne1.yahoo.com
Date: Wed, 27 Jul 2016 15:31:35 +0000 (UTC)
From: Peder Sverdrup <psverdrup AT yahoo DOT com>
Reply-To: Peder Sverdrup <psverdrup AT yahoo DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Message-ID: <1862051364.5309945.1469633495642.JavaMail.yahoo@mail.yahoo.com>
Subject: Can a .sh script stored in c:\scripts\ (Windows part of filesystem) be run from crontab?
MIME-Version: 1.0
References: <1862051364 DOT 5309945 DOT 1469633495642 DOT JavaMail DOT yahoo DOT ref AT mail DOT yahoo DOT com>

Hi,
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 &

Kind regards, Peder

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