delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/09/25/10:22:48

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: RE: Error running cvs commands from crontab
Date: Thu, 25 Sep 2008 10:22:04 -0400
Message-ID: <706E67D60BBB724C8BF3D2DA531CF1964BB85E@bpc-hs-mx1.biopop.com>
In-Reply-To: <da32b99c0809250707r2d2aca10ga448637b5b306320@mail.gmail.com>
References: <da32b99c0809250707r2d2aca10ga448637b5b306320 AT mail DOT gmail DOT com>
From: "Allan Schrum" <aschrum AT biopop DOT com>
To: <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id m8PEMkVf016087


> -----Original Message-----
> From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On
> Behalf Of Senthil Kuppusamy
> Sent: Thursday, September 25, 2008 10:07 AM
> To: cygwin AT cygwin DOT com
> Subject: Error running cvs commands from crontab
> 
> Hi,
> 
>  I was trying to update my project
> directory from remote cvs server like "cvs -d
> user AT 98 DOT 21 DOT 22 DOT 10:/home/cvsroot/ my_project" and getting following
error
> 
> Errror log
> Runs commands on remote hosts running the RSH service. RSH host [-l
> username] [-n] command host Specifies the remote host on which to run
> command. -l username Specifies the user name to use on the remote
> host. If omitted, the logged on user name is used. -n Redirects the
> input of RSH to NULL. command Specifies the command to run. cvs
> [update aborted]: end of file from server (consult above messages if
> any)
> 
> When I tried to run from command prompt it runs. Running through
> crontab throws this issue
> I have used the same cvs path from CVSROOT variable. Also using the
> same cvs user account on both occasions.
> 
> Thanks,
> Senthil.

Traditionally cron runs under a reduced environment that typically does
not match an interactive environment. Many environment variables are
missing which may affect how the cron job runs. Perhaps if you create a
small command file to print out all your environment variables under
cron and compare that with your interactive environment you may find the
clue which helps. Typically, the PATH variable does not include what you
need to make things work. Since RSH is mentioned, you may need to define
the CVS_RSH variable to make this work under cron.

Rather than run the "cvs" command directly in cron, put it into a
command script where you can control the environment as desired and then
run the script from cron. This helps avoid some of the syntax hazards of
very complex cron commands.

Regards,

-Allan

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019