This is the mail archive of the
mailing list for the Cygwin project.
/etc/profile not being executed by cron job
- From: Al Goodniss <amg at townisp dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 25 Sep 2003 12:14:17 -0400
- Subject: /etc/profile not being executed by cron job
- Reply-to: amg at townisp dot com
Please point me to what I missed. I have a simple cron job doing backups using tar and find. Works flawlessly in an interactive shell. Cron also works fine for fetching mail, etc. The combination doesn't work.
When I run my bash (tcsh also fails) script via Cron the wrong find is found. Instead of /usr/bin/find I get the windows version. My /etc/profile does prepend the directories, the permissions seen accurate - as per the other fixes that were in the archives.
What did I miss?
--- Test script ---
echo $PATH # reports only windows paths, no Cygwin
which find # Finds the win32 version
-- Results --
Thu Sep 25 12:08:00 EST 2003
oft SQL Server/80/Tools/Binn/:/bin
-- /etc/profile --
# Set up USER's home directory
if [ -z "$HOME" ]; then
if [ ! -d "$HOME" ]; then
mkdir -p "$HOME"
export HOME USER
for i in /etc/profile.d/*.sh ; do
if [ -f $i ]; then
export PS1='\[\033]0;\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ '
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html