Re: Cygwin problem with cron and networked drives



On 28 Jun 2006 07:54:43 -0700, ambroze <ambroze@xxxxxxxxxxx> wrote:
I have a directory on the network (/cygdrive/f/MD408/out) that is not
recognized when I add a script in cron. If I run this script from the
command line it is recognized.
It's only when it is a mapped network drive (f), it I change it to the
local drive (c) it will work fine.

Here is my cron example:

20 09 * * * exec /cygdrive/c/working/bin/test.sh

Here is the script example of test.sh
-------------------------------------------------------------------
if [ -d /cygdrive/f/MD408/out ];then
echo "Found $outdir"
else
echo "NOT Found $outdir"
fi
-------------------------------------------------------------------

Any thoughts anyone?

Is the command line version that works running on a Linux system or an
MS Windows system?

Is the cron job running on a linux system or an MS Windows system?

Is the mapped network drive /cygrive on a linux system or an
MS Windows system?

Is the connection to the network drive via SMB (SAMBA) or NFS or
something else?

It's impossible to guess the problem without answers to these
questions.

I bet that all of the various systems involved are MS Windows systems
but using Cygwin on the executing system. In this case, you're in
the wrong newsgroup.

Probably the resolution will have something to do with the different
capabilities of the user running the command line version that works,
versus the user running the cron job.

In the future, please give more info.

--
Dale Dellutri <ddelQQQlutr@xxxxxxxxxxxx> (lose the Q's)
.



Relevant Pages

  • Re: Cron Job
    ... If you mean the computer itself, put that command ... The standard 'cron' runs jobs at a specific time/date. ... Init or @reboot run jobs when ... Sunday night at 02:00) then copy the script and cron entry. ...
    (comp.os.linux.misc)
  • Re: Nmon scheduling question
    ... command ran first then in the script is the ps and kill command so it ... Vince this is a great script. ... Cron Job with pid: 135238 Failed ...
    (AIX-L)
  • Re: [SLE] rsync log
    ... If you type kcron you should get the ... What this means is the non-error output from a command like rsync prints ... the standard output of a cron job is emailed ... kcron is just a GIU way to specify your crontab ...
    (SuSE)
  • Re: Urgent request: Where does the authorized_keys file have to go on a Windows system?
    ... >> I even tried putting a copy of cmd.exe in the path, still no luck. ... > Can you use cmd.exe as the actual command and pass the rename as an ... if I run a command remotly, ... Any idea how to set up the path in a Windows system? ...
    (comp.security.ssh)
  • Re: script run from crontab, output not appearing as expected
    ... Project Leader, Komatsu America ... the command line as root, ... It is a TSM script that gathers ... Thus far, I am looking at this as a cron issue, not a TSM issue so I asked ...
    (AIX-L)