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: Error running cvs commands from crontab



> -----Original Message-----
> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On
> Behalf Of Senthil Kuppusamy
> Sent: Thursday, September 25, 2008 10:07 AM
> To: cygwin@cygwin.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@98.21.22.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/


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