X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Thu, 29 Mar 2012 11:16:49 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: /cygdrive/f/ missing when my script is executed by cron
Message-ID: <20120329091649.GC30721@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <jl15l1$8k6$1@dough.gmane.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <jl15l1$8k6$1@dough.gmane.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Mar 29 10:14, Stéphane Klein wrote:
> Hi,
> 
> I try to configure rsync on MS Windows to execute a folder
> synchronization every day.
> 
> I use this tools :
> 
> * I've installed cygwin
> * I've use cygwin setup.exe to install rsync, openssh, cron
> 
> Next, in cygwin terminal, I did :
> 
> * I've created a ssh key and I've set it up on remote server
> * next, I've wrote a bash script which execute rsync. Note : my
> source data are in "f:" device, meaning it's in "/cygdrive/f/" path
> (from cygwin terminal)
> * I've tested my bash script, it works very well, all files are
> copied to remote host
> * I've used cron-config to configure cron service
> * I've append my bash script in cron configuration with crontab -e
> * My bash script is executed by cron, I see it with cronevents
> 
> But, I've have an issue : when my bash script is executed by cron,
> it hasn't access to /cygdrive/f/, this device isn't mounted !

Remote shares are mounted on a per user-session basis.  Cron as a
service is not running in your desktop user-session.  If you want
to access remote shares in your cron session, you have to mount them
explicitely in your cron job.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

