This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cron copy on network drives


Paul,

On Thu, Mar 03, 2005 at 08:13:36AM -0800, Paul Hodor wrote:
> I am trying to set up a cron service to update some directories on a
> network drive, but I ran into a problem.
> 
> This copy command works from the command-line:
> cp -a -u -v //mydrive/myshare/dir1/* //mydrive/myshare/dir2 >> log 2>&1
> 
> However, if I run it with cron I get the following error:
> cp: cannot stat `//mydrive/myshare/dir1/*': No such file or directory
> 
> Do I need to use a different syntax for the path or am I doing
> something else wrong? I am running Windows XP Professional version 2002
> SP1 and cygwin DLL version 1.5.12.

The attached script, remount.sh, may help to solve your problem with a
few changes as appropriate:

    1. SSS
    2. DDD
    3. share

and if you are willing to store your Windows password in a file (i.e.,
~/.passwd).

I use remount.sh at work to remount a network share so I can backup my
local home directory (which is not otherwise backed up) to this share
(which is).

My crontab entry looks like the following:

    5 2 * * * remount.sh; backup.sh ...

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Attachment: remount.sh
Description: Bourne shell script

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]