* /cygdrive/f/ missing when my script is executed by cron
@ 2012-03-29 8:15 Stéphane Klein
2012-03-29 9:17 ` Corinna Vinschen
0 siblings, 1 reply; 5+ messages in thread
From: Stéphane Klein @ 2012-03-29 8:15 UTC (permalink / raw)
To: cygwin
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 !
Do you have already had this problem ?
I've very few cygwin experience, I don't know where to dig.
Thanks for your help.
Regards,
Stephane
--
Stéphane Klein <stephane@harobed.org>
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /cygdrive/f/ missing when my script is executed by cron
2012-03-29 8:15 /cygdrive/f/ missing when my script is executed by cron Stéphane Klein
@ 2012-03-29 9:17 ` Corinna Vinschen
2012-03-29 10:00 ` Stéphane Klein
2012-03-29 10:00 ` Stéphane Klein
0 siblings, 2 replies; 5+ messages in thread
From: Corinna Vinschen @ 2012-03-29 9:17 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /cygdrive/f/ missing when my script is executed by cron
2012-03-29 9:17 ` Corinna Vinschen
2012-03-29 10:00 ` Stéphane Klein
@ 2012-03-29 10:00 ` Stéphane Klein
1 sibling, 0 replies; 5+ messages in thread
From: Stéphane Klein @ 2012-03-29 10:00 UTC (permalink / raw)
To: cygwin
Le 29/03/2012 11:16, Corinna Vinschen a écrit :
>> 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.
Thanks.
Do you have command example or document reference about this command
(mount remote shares from my bash script) ?
Thanks for your help.
Regards,
Stephane
--
Stéphane Klein <stephane@harobed.org>
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /cygdrive/f/ missing when my script is executed by cron
2012-03-29 9:17 ` Corinna Vinschen
@ 2012-03-29 10:00 ` Stéphane Klein
2012-03-29 11:37 ` Corinna Vinschen
2012-03-29 10:00 ` Stéphane Klein
1 sibling, 1 reply; 5+ messages in thread
From: Stéphane Klein @ 2012-03-29 10:00 UTC (permalink / raw)
To: cygwin
Le 29/03/2012 11:16, Corinna Vinschen a écrit :
>> 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.
Thanks.
Do you have command example or document reference about this command
(mount remote shares from my bash script) ?
Thanks for your help.
Regards,
Stephane
--
Stéphane Klein <stephane@harobed.org>
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /cygdrive/f/ missing when my script is executed by cron
2012-03-29 10:00 ` Stéphane Klein
@ 2012-03-29 11:37 ` Corinna Vinschen
0 siblings, 0 replies; 5+ messages in thread
From: Corinna Vinschen @ 2012-03-29 11:37 UTC (permalink / raw)
To: cygwin
On Mar 29 11:59, Stéphane Klein wrote:
> Le 29/03/2012 11:16, Corinna Vinschen a écrit :
> >>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.
>
> Thanks.
>
> Do you have command example or document reference about this command
> (mount remote shares from my bash script) ?
$ net use '/?'
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-29 11:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-29 8:15 /cygdrive/f/ missing when my script is executed by cron Stéphane Klein
2012-03-29 9:17 ` Corinna Vinschen
2012-03-29 10:00 ` Stéphane Klein
2012-03-29 11:37 ` Corinna Vinschen
2012-03-29 10:00 ` Stéphane Klein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).