cron job not running

11.1 64 bit

Can anyone tell me why this cron job is not running?

The script runs fine from the users shell prompt.

crontab -e

(Cron version V5.0 – $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie

Exp $)
1 16 * * * sh /home/pathp/Navicat/start_navicat /schedule “Rack 5 to
Local All”

???


Ski_K2

Ski_K2’s Profile: http://forums.opensuse.org/member.php?userid=6818
View this thread: http://forums.opensuse.org/showthread.php?t=404918

If you had any commands in the shell script “schedule” that depended on
your $PATH or $HOME, they would fail to run.

You should have received email containing any output from the job. Have
you looked for the email?


ken_yap

ken_yap’s Profile: http://forums.opensuse.org/member.php?userid=221
View this thread: http://forums.opensuse.org/showthread.php?t=404918

I have not looked for email.

I’ll do that.

Thanks


Ski_K2

Ski_K2’s Profile: http://forums.opensuse.org/member.php?userid=6818
View this thread: http://forums.opensuse.org/showthread.php?t=404918

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Agreed… start by changing ‘sh’ to ‘/bin/sh’ (or ‘/bin/bash’) just to
be sure, and then also check for that e-mail. The /var/log/messages
file should also have output from when it was attempted (if it was
attempted). Set to ‘* * * * *’ for testing, or something that runs
more-often than once per day.

Good luck.

ken yap wrote:
> If you had any commands in the shell script “schedule” that depended on
> your $PATH or $HOME, they would fail to run.
>
> You should have received email containing any output from the job. Have
> you looked for the email?
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJbfK73s42bA80+9kRAkqbAJ9DaUFxKtPMXjQoCyox5gY3zYXE0ACfTOz4
B2LM3l/rmE4buMlGvoFnFGg=
=z5zh
-----END PGP SIGNATURE-----

ken_yap;1927067 Wrote:
> If you had any commands in the shell script “schedule” that depended on
> your $PATH or $HOME, they would fail to run.
>
> You should have received email containing any output from the job. Have
> you looked for the email?

If, during my Suse install, I ticked the box to receive system mail
where would I find it?

I don’t have a /var/log/mail.

The script does use $HOME and other system variables but if the script
runs OK at this users shell then why would the users crontab not run it
OK?


Ski_K2

Ski_K2’s Profile: http://forums.opensuse.org/member.php?userid=6818
View this thread: http://forums.opensuse.org/showthread.php?t=404918

I’ll try /bin/sh

Thanks ab


Ski_K2

Ski_K2’s Profile: http://forums.opensuse.org/member.php?userid=6818
View this thread: http://forums.opensuse.org/showthread.php?t=404918

The mail goes to /var/mail/<user>.

If you didn’t have postfix running the mail might have been lost. You
can capture the output of the cron job by appending

> /tmp/schedule.log 2>&1

to the line.

In a cron job, various variables that are set in a normal interactive
session are not. There is no $HOME because there is no login. And $PATH
will be the system default.


ken_yap

ken_yap’s Profile: http://forums.opensuse.org/member.php?userid=221
View this thread: http://forums.opensuse.org/showthread.php?t=404918

ken_yap;1927513 Wrote:
> The mail goes to /var/mail/<user>.
>
> If you didn’t have postfix running the mail might have been lost. You
> can capture the output of the cron job by appending
>
> > /tmp/schedule.log 2>&1
>
> to the line.
>
> In a cron job, various variables that are set in a normal interactive
> session are not. There is no $HOME because there is no login. And $PATH
> will be the system default.

/bin/sh doesn’t seem to run either.

Changing the crontab entry to

25 17 * * *
/home/pathp/Navicat/start_navicat /schedule “Rack 5 to Local All”

gets it to appear in var/log/messages calling the script but it does
not run. Perhaps due to the missing variables?

This same script ran fine in 10.3 using a native linux version of this
application.

The current version running is a winblows app running using wine

Here’s a copy of the script

Code:

#!/bin/bash

This is a script modified from Picasa wrapper script to launch Navicat.exe

cd dirname "$0"
navicat_root=pwd

Wine environment required

export PATH="$navicat_root/wine/bin":"$navicat_root":$PATH
export LD_LIBRARY_PATH="$navicat_root/wine/lib":"$navicat_root/lib":$LD_LIBRARY_PATH
export WINEDLLPATH="$navicat_root/wine/lib/wine"
export WINELOADER="$navicat_root/wine/bin/wine"
export WINESERVER="$navicat_root/wine/bin/wineserver"
export WINEPREFIX=$HOME/.navicat
export WINEDLLOVERRIDES=“msxml3=n” # use native msxml3

find the x window server location at [current machine]:[displaynumber=0]:[screennumber=0] to run x window application

used in crontab schedule part of navicat

export DISPLAY=":0.0"

create directories

-d “$WINEPREFIX” ] || mkdir -p “$WINEPREFIX”
-d “$WINEPREFIX/drive_c” ] || mkdir -p “$WINEPREFIX/drive_c”
-d “$WINEPREFIX/drive_c/Program Files” ] || mkdir -p “$WINEPREFIX/drive_c/Program Files”
-d “$WINEPREFIX/drive_c/windows” ] || mkdir -p “$WINEPREFIX/drive_c/windows”
-d “$WINEPREFIX/drive_c/windows/temp” ] || mkdir -p “$WINEPREFIX/drive_c/windows/temp”
-d “$WINEPREFIX/drive_c/windows/inf.done” ] || mkdir -p “$WINEPREFIX/drive_c/windows/inf.done”
-d “$WINEPREFIX/dosdevices” ] || mkdir -p “$WINEPREFIX/dosdevices”

check integrity of system directories

for system_dir in
drive_c/windows/fonts
drive_c/windows/inf
drive_c/windows/system
drive_c/windows/system32
; do
if -h “$WINEPREFIX/$system_dir” ] ; then
if stat --dereference --format %i "$WINEPREFIX/$system_dir" = stat --dereference --format %i "$navicat_root/wine/$system_dir" ] ; then
continue;
fi
-d “$WINEPREFIX/$system_dir” ] || rm -f “$WINEPREFIX/$system_dir”
fi

-d “$WINEPREFIX/$system_dir” ] || ln -s “$navicat_root/wine/$system_dir” “$WINEPREFIX/$system_dir”

done

create Navicat directories

-h “$WINEPREFIX/Navicat” ] && rm -f “$WINEPREFIX/Navicat”
-d “$WINEPREFIX/Navicat” ] || mkdir -p “$WINEPREFIX/Navicat”
(cd “$navicat_root/Navicat”;
for x in * ; do
oldlink="pwd/$x"
newlink="$WINEPREFIX/Navicat/$x"
if -h “$newlink” ] ; then
if stat --dereference --format %i "$oldlink" = stat --dereference --format %i "$newlink" ] ; then
continue;
fi
-d “$newlink” ] || rm -f “$newlink”
fi

-d “$newlink” ] || ln -s “$oldlink” “$newlink”

done
)

create wine emulated devices

if -h “$WINEPREFIX/dosdevices/c:” ] ; then
-d “$WINEPREFIX/dosdevices/c:” ] || rm -f “$WINEPREFIX/dosdevices/c:”
fi
-d “$WINEPREFIX/dosdevices/c:” ] || ln -s “$WINEPREFIX/drive_c/” “$WINEPREFIX/dosdevices/c:”

if -h “$WINEPREFIX/dosdevices/z:” ] ; then
-d “$WINEPREFIX/dosdevices/z:” ] || rm -f “$WINEPREFIX/dosdevices/z:”
fi
-d “$WINEPREFIX/dosdevices/z:” ] || ln -s / “$WINEPREFIX/dosdevices/z:”

if -h “$WINEPREFIX/dosdevices/y:” ] ; then
-d “$WINEPREFIX/dosdevices/y:” ] || rm -f “$WINEPREFIX/dosdevices/y:”
fi
if -d “$HOME” ] ; then
-d “$WINEPREFIX/dosdevices/y:” ] || ln -s “$HOME” “$WINEPREFIX/dosdevices/y:”
fi

hide error/stdout message

if test “z$WINEDEBUG” = z ; then
exec >/tmp/navicat.output 2>&1
fi

install inf

for infcmd in wine.inf/DefaultInstall ; do
inffile=echo $infcmd | cut -d '/' -f 1
inftype=echo $infcmd | cut -d '/' -f 2

runreg=0
if -f “$WINEPREFIX/drive_c/windows/inf.done/$inffile” ] ; then
diff -q “$WINEPREFIX/drive_c/windows/inf/$inffile” “$WINEPREFIX/drive_c/windows/inf.done/$inffile” >/dev/null 2>&1
if $? -ne 0 ] ; then
runreg=1
fi
else
runreg=1
fi

if $runreg -gt 0 ] ; then
“${WINELOADER:-wine}” rundll32.exe setupapi.dll,InstallHinfSection $inftype 128 $inffile
cp “$WINEPREFIX/drive_c/windows/inf/$inffile” “$WINEPREFIX/drive_c/windows/inf.done/$inffile”
fi
done

run Navicat.exe

exec “${WINELOADER:-wine}” “$navicat_root/Navicat/Navicat.exe” “$1” “$2” “$3” “$4” “$5” “$6” “$7”

Any ideas on getting it to run as a cron would be appreciated!


Ski_K2

Ski_K2’s Profile: http://forums.opensuse.org/member.php?userid=6818
View this thread: http://forums.opensuse.org/showthread.php?t=404918

Is this your personal crontab, edited with crontab -e, or the system
crontab, /etc/crontab? In the second case you need to specify the user
in the 6th field, like this:

25 17 * * * pathp /home/pathp/…


ken_yap

ken_yap’s Profile: http://forums.opensuse.org/member.php?userid=221
View this thread: http://forums.opensuse.org/showthread.php?t=404918

Personal.

I’m the only user on the system.

I open a terminal from gnome as personal user, not root

crontab -e


Ski_K2

Ski_K2’s Profile: http://forums.opensuse.org/member.php?userid=6818
View this thread: http://forums.opensuse.org/showthread.php?t=404918

Change that line to:

Code:

25 17 * * * sh -vx /home/pathp/Navicat/start_navicat/schedule “Rack 5 to Local All” > /tmp/schedule.log 2>&1

well, also adjust the time to run soon, and look at the output in the
log file.

BTW, there was a space between start_navicat and /, was that the way it
was in the crontab or just a typo.


ken_yap

ken_yap’s Profile: http://forums.opensuse.org/member.php?userid=221
View this thread: http://forums.opensuse.org/showthread.php?t=404918

I think the space is required to pass the param to the start_navicat
script.

I’ll run your suggestion in 5 minutes.

If it runs the script takes an hour and 15 minutes to sync 100+
databases on my remote server down to my local box.

Thanks


Ski_K2

Ski_K2’s Profile: http://forums.opensuse.org/member.php?userid=6818
View this thread: http://forums.opensuse.org/showthread.php?t=404918

Ok, so /schedule is the first parameter, not the name of the script,
gotcha.


ken_yap

ken_yap’s Profile: http://forums.opensuse.org/member.php?userid=221
View this thread: http://forums.opensuse.org/showthread.php?t=404918

Navicat.exe appeared briefly in the running process list but the script
did not run:(


Ski_K2

Ski_K2’s Profile: http://forums.opensuse.org/member.php?userid=6818
View this thread: http://forums.opensuse.org/showthread.php?t=404918

Schedule.log

> #!/bin/bash
> # This is a script modified from Picasa wrapper script to launch
> Navicat.exe
>
> cd dirname "$0"
> dirname “$0”
> ++ dirname /home/pathp/Navicat/start_navicat
> + cd /home/pathp/Navicat
> navicat_root=pwd
> pwd
> ++ pwd
> + navicat_root=/home/pathp/Navicat
>
> # Wine environment required
> export PATH="$navicat_root/wine/bin":"$navicat_root":$PATH
> + export
> PATH=/home/pathp/Navicat/wine/bin:/home/pathp/Navicat:/usr/bin:/bin
> + PATH=/home/pathp/Navicat/wine/bin:/home/pathp/Navicat:/usr/bin:/bin
> export
> LD_LIBRARY_PATH="$navicat_root/wine/lib":"$navicat_root/lib":$LD_LIBRARY_PATH
> + export
> LD_LIBRARY_PATH=/home/pathp/Navicat/wine/lib:/home/pathp/Navicat/lib:
> +
> LD_LIBRARY_PATH=/home/pathp/Navicat/wine/lib:/home/pathp/Navicat/lib:
> export WINEDLLPATH="$navicat_root/wine/lib/wine"
> + export WINEDLLPATH=/home/pathp/Navicat/wine/lib/wine
> + WINEDLLPATH=/home/pathp/Navicat/wine/lib/wine
> export WINELOADER="$navicat_root/wine/bin/wine"
> + export WINELOADER=/home/pathp/Navicat/wine/bin/wine
> + WINELOADER=/home/pathp/Navicat/wine/bin/wine
> export WINESERVER="$navicat_root/wine/bin/wineserver"
> + export WINESERVER=/home/pathp/Navicat/wine/bin/wineserver
> + WINESERVER=/home/pathp/Navicat/wine/bin/wineserver
> export WINEPREFIX=$HOME/.navicat
> + export WINEPREFIX=/home/pathp/.navicat
> + WINEPREFIX=/home/pathp/.navicat
> export WINEDLLOVERRIDES=“msxml3=n” # use native msxml3
> + export WINEDLLOVERRIDES=msxml3=n
> + WINEDLLOVERRIDES=msxml3=n
> # find the x window server location at [current
> machine]:[displaynumber=0]:[screennumber=0] to run x window application
> # used in crontab schedule part of navicat
> export DISPLAY=":0.0"
> + export DISPLAY=:0.0
> + DISPLAY=:0.0
>
>


Ski_K2

Ski_K2’s Profile: http://forums.opensuse.org/member.php?userid=6818
View this thread: http://forums.opensuse.org/showthread.php?t=404918

log too long for on post

cont’d

> # create directories
> -d “$WINEPREFIX” ] || mkdir -p “$WINEPREFIX”
> + ‘’ -d /home/pathp/.navicat ‘]’
> -d “$WINEPREFIX/drive_c” ] || mkdir -p “$WINEPREFIX/drive_c”
> + ‘’ -d /home/pathp/.navicat/drive_c ‘]’
> -d “$WINEPREFIX/drive_c/Program Files” ] || mkdir -p
> “$WINEPREFIX/drive_c/Program Files”
> + ‘’ -d ‘/home/pathp/.navicat/drive_c/Program Files’ ‘]’
> -d “$WINEPREFIX/drive_c/windows” ] || mkdir -p
> “$WINEPREFIX/drive_c/windows”
> + ‘’ -d /home/pathp/.navicat/drive_c/windows ‘]’
> -d “$WINEPREFIX/drive_c/windows/temp” ] || mkdir -p
> “$WINEPREFIX/drive_c/windows/temp”
> + ‘’ -d /home/pathp/.navicat/drive_c/windows/temp ‘]’
> -d “$WINEPREFIX/drive_c/windows/inf.done” ] || mkdir -p
> “$WINEPREFIX/drive_c/windows/inf.done”
> + ‘’ -d /home/pathp/.navicat/drive_c/windows/inf.done ‘]’
> -d “$WINEPREFIX/dosdevices” ] || mkdir -p “$WINEPREFIX/dosdevices”
> + ‘’ -d /home/pathp/.navicat/dosdevices ‘]’
>
> # check integrity of system directories
> for system_dir in
> drive_c/windows/fonts
> drive_c/windows/inf
> drive_c/windows/system
> drive_c/windows/system32
> ; do
> if -h “$WINEPREFIX/$system_dir” ] ; then
> if stat --dereference --format %i "$WINEPREFIX/$system_dir" =
> stat --dereference --format %i "$navicat_root/wine/$system_dir" ] ;
> then
> continue;
> fi
> -d “$WINEPREFIX/$system_dir” ] || rm -f
> “$WINEPREFIX/$system_dir”
> fi
>
> -d “$WINEPREFIX/$system_dir” ] || ln -s
> “$navicat_root/wine/$system_dir” “$WINEPREFIX/$system_dir”
>
> done
> + for system_dir in drive_c/windows/fonts drive_c/windows/inf
> drive_c/windows/system drive_c/windows/system32
> + ‘’ -h /home/pathp/.navicat/drive_c/windows/fonts ‘]’
> stat --dereference --format %i “$WINEPREFIX/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/drive_c/windows/fonts
> stat --dereference --format %i “$navicat_root/wine/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/wine/drive_c/windows/fonts
> + ‘’ 1425989 = 1425989 ‘]’
> + continue
> + for system_dir in drive_c/windows/fonts drive_c/windows/inf
> drive_c/windows/system drive_c/windows/system32
> + ‘’ -h /home/pathp/.navicat/drive_c/windows/inf ‘]’
> stat --dereference --format %i “$WINEPREFIX/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/drive_c/windows/inf
> stat --dereference --format %i “$navicat_root/wine/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/wine/drive_c/windows/inf
> + ‘’ 1425994 = 1425994 ‘]’
> + continue
> + for system_dir in drive_c/windows/fonts drive_c/windows/inf
> drive_c/windows/system drive_c/windows/system32
> + ‘’ -h /home/pathp/.navicat/drive_c/windows/system ‘]’
> stat --dereference --format %i “$WINEPREFIX/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/drive_c/windows/system
> stat --dereference --format %i “$navicat_root/wine/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/wine/drive_c/windows/system
> + ‘’ 1425996 = 1425996 ‘]’
> + continue
> + for system_dir in drive_c/windows/fonts drive_c/windows/inf
> drive_c/windows/system drive_c/windows/system32
> + ‘’ -h /home/pathp/.navicat/drive_c/windows/system32 ‘]’
> stat --dereference --format %i “$WINEPREFIX/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/drive_c/windows/system32
> stat --dereference --format %i “$navicat_root/wine/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/wine/drive_c/windows/system32
> + ‘’ 1425999 = 1425999 ‘]’
> + continue
>
> # create Navicat directories
> -h “$WINEPREFIX/Navicat” ] && rm -f “$WINEPREFIX/Navicat”
> + ‘’ -h /home/pathp/.navicat/Navicat ‘]’
> -d “$WINEPREFIX/Navicat” ] || mkdir -p “$WINEPREFIX/Navicat”
> + ‘’ -d /home/pathp/.navicat/Navicat ‘]’
> (cd “$navicat_root/Navicat”;
> for x in * ; do
> oldlink=“pwd/$x”
> newlink=“$WINEPREFIX/Navicat/$x”
> if -h “$newlink” ] ; then
> if stat --dereference --format %i "$oldlink" = `stat

–dereference --format %i “$newlink”` ] ; then
> continue;
> fi
> -d “$newlink” ] || rm -f “$newlink”
> fi
>
> -d “$newlink” ] || ln -s “$oldlink” “$newlink”
>
> done
> )
> + cd /home/pathp/Navicat/Navicat
> + for x in ‘
> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/Navicat.exe
> + newlink=/home/pathp/.navicat/Navicat/Navicat.exe
> + ‘’ -h /home/pathp/.navicat/Navicat/Navicat.exe ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/Navicat/Navicat.exe
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/Navicat/Navicat.exe
> + ‘’ 1425955 = 1425955 ‘]’
> + continue
> + for x in '

> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/help
> + newlink=/home/pathp/.navicat/Navicat/help
> + ‘’ -h /home/pathp/.navicat/Navicat/help ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i /home/pathp/Navicat/Navicat/help
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i /home/pathp/.navicat/Navicat/help
> + ‘’ 1425411 = 1425411 ‘]’
> + continue
> + for x in ‘
> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/libeay32.dll
> + newlink=/home/pathp/.navicat/Navicat/libeay32.dll
> + ‘’ -h /home/pathp/.navicat/Navicat/libeay32.dll ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/Navicat/libeay32.dll
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/Navicat/libeay32.dll
> + ‘’ 1425952 = 1425952 ‘]’
> + continue
> + for x in '

> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/libmysql_c.dll
> + newlink=/home/pathp/.navicat/Navicat/libmysql_c.dll
> + ‘’ -h /home/pathp/.navicat/Navicat/libmysql_c.dll ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/Navicat/libmysql_c.dll
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/Navicat/libmysql_c.dll
> + ‘’ 1425953 = 1425953 ‘]’
> + continue
> + for x in ‘
> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/license.txt
> + newlink=/home/pathp/.navicat/Navicat/license.txt
> + ‘’ -h /home/pathp/.navicat/Navicat/license.txt ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/Navicat/license.txt
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/Navicat/license.txt
> + ‘’ 1425954 = 1425954 ‘]’
> + continue
> + for x in '

> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/logs
> + newlink=/home/pathp/.navicat/Navicat/logs
> + ‘’ -h /home/pathp/.navicat/Navicat/logs ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i /home/pathp/Navicat/Navicat/logs
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i /home/pathp/.navicat/Navicat/logs
> + ‘’ 1434109 = 1434109 ‘]’
> + continue
> + for x in ‘
> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/ntunnel_mysql.php
> + newlink=/home/pathp/.navicat/Navicat/ntunnel_mysql.php
> + ‘’ -h /home/pathp/.navicat/Navicat/ntunnel_mysql.php ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/Navicat/ntunnel_mysql.php
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/Navicat/ntunnel_mysql.php
> + ‘’ 1425956 = 1425956 ‘]’
> + continue
> + for x in '

> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/profiles
> + newlink=/home/pathp/.navicat/Navicat/profiles
> + ‘’ -h /home/pathp/.navicat/Navicat/profiles ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i /home/pathp/Navicat/Navicat/profiles
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/Navicat/profiles
> + ‘’ 1434106 = 1434106 ‘]’
> + continue
> + for x in ‘*’
> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/ssleay32.dll
> + newlink=/home/pathp/.navicat/Navicat/ssleay32.dll
> + ‘’ -h /home/pathp/.navicat/Navicat/ssleay32.dll ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/Navicat/ssleay32.dll
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/Navicat/ssleay32.dll
> + ‘’ 1425957 = 1425957 ‘]’
> + continue
>
> # create wine emulated devices
> if -h “$WINEPREFIX/dosdevices/c:” ] ; then
> -d “$WINEPREFIX/dosdevices/c:” ] || rm -f
> “$WINEPREFIX/dosdevices/c:”
> fi
> + ‘’ -h /home/pathp/.navicat/dosdevices/c: ‘]’
> + ‘’ -d /home/pathp/.navicat/dosdevices/c: ‘]’
> -d “$WINEPREFIX/dosdevices/c:” ] || ln -s “$WINEPREFIX/drive_c/”
> “$WINEPREFIX/dosdevices/c:”
> + ‘’ -d /home/pathp/.navicat/dosdevices/c: ‘]’
>
> if -h “$WINEPREFIX/dosdevices/z:” ] ; then
> -d “$WINEPREFIX/dosdevices/z:” ] || rm -f
> “$WINEPREFIX/dosdevices/z:”
> fi
> + ‘’ -h /home/pathp/.navicat/dosdevices/z: ‘]’
> + ‘’ -d /home/pathp/.navicat/dosdevices/z: ‘]’
> -d “$WINEPREFIX/dosdevices/z:” ] || ln -s /
> “$WINEPREFIX/dosdevices/z:”
> + ‘’ -d /home/pathp/.navicat/dosdevices/z: ‘]’
>
> if -h “$WINEPREFIX/dosdevices/y:” ] ; then
> -d “$WINEPREFIX/dosdevices/y:” ] || rm -f
> “$WINEPREFIX/dosdevices/y:”
> fi
> + ‘’ -h /home/pathp/.navicat/dosdevices/y: ‘]’
> + ‘’ -d /home/pathp/.navicat/dosdevices/y: ‘]’
> if -d “$HOME” ] ; then
> -d “$WINEPREFIX/dosdevices/y:” ] || ln -s “$HOME”
> “$WINEPREFIX/dosdevices/y:”
> fi
> + ‘’ -d /home/pathp ‘]’
> + ‘’ -d /home/pathp/.navicat/dosdevices/y: ‘]’
>
> # hide error/stdout message
> if test “z$WINEDEBUG” = z ; then
> exec >/tmp/navicat.output 2>&1
> fi
> + test z = z
> + exec


Ski_K2

Ski_K2’s Profile: http://forums.opensuse.org/member.php?userid=6818
View this thread: http://forums.opensuse.org/showthread.php?t=404918

So it looks like it’s navicat that doesn’t like being run out of cron.
Try this:

Code:

25 17 * * * HOME=/home/pathp sh -vx /home/pathp/Navicat/start_navicat/schedule “Rack 5 to Local All” > /tmp/schedule.log 2>&1

Maybe it won’t feel homeless after that.

Does navicat require a running X server also?


ken_yap

ken_yap’s Profile: http://forums.opensuse.org/member.php?userid=221
View this thread: http://forums.opensuse.org/showthread.php?t=404918

re x server,

if i open a terminal as user pathp and run this from command line it
runs fine

sh /home/pathp/Navicat/start_navicat /schedule “Rack 5 to Local All”


Ski_K2

Ski_K2’s Profile: http://forums.opensuse.org/member.php?userid=6818
View this thread: http://forums.opensuse.org/showthread.php?t=404918

no joy :frowning:

> #!/bin/bash
> # This is a script modified from Picasa wrapper script to launch
> Navicat.exe
>
> cd dirname "$0"
> dirname “$0”
> ++ dirname /home/pathp/Navicat/start_navicat
> + cd /home/pathp/Navicat
> navicat_root=pwd
> pwd
> ++ pwd
> + navicat_root=/home/pathp/Navicat
>
> # Wine environment required
> export PATH="$navicat_root/wine/bin":"$navicat_root":$PATH
> + export
> PATH=/home/pathp/Navicat/wine/bin:/home/pathp/Navicat:/usr/bin:/bin
> + PATH=/home/pathp/Navicat/wine/bin:/home/pathp/Navicat:/usr/bin:/bin
> export
> LD_LIBRARY_PATH="$navicat_root/wine/lib":"$navicat_root/lib":$LD_LIBRARY_PATH
> + export
> LD_LIBRARY_PATH=/home/pathp/Navicat/wine/lib:/home/pathp/Navicat/lib:
> +
> LD_LIBRARY_PATH=/home/pathp/Navicat/wine/lib:/home/pathp/Navicat/lib:
> export WINEDLLPATH="$navicat_root/wine/lib/wine"
> + export WINEDLLPATH=/home/pathp/Navicat/wine/lib/wine
> + WINEDLLPATH=/home/pathp/Navicat/wine/lib/wine
> export WINELOADER="$navicat_root/wine/bin/wine"
> + export WINELOADER=/home/pathp/Navicat/wine/bin/wine
> + WINELOADER=/home/pathp/Navicat/wine/bin/wine
> export WINESERVER="$navicat_root/wine/bin/wineserver"
> + export WINESERVER=/home/pathp/Navicat/wine/bin/wineserver
> + WINESERVER=/home/pathp/Navicat/wine/bin/wineserver
> export WINEPREFIX=$HOME/.navicat
> + export WINEPREFIX=/home/pathp/.navicat
> + WINEPREFIX=/home/pathp/.navicat
> export WINEDLLOVERRIDES=“msxml3=n” # use native msxml3
> + export WINEDLLOVERRIDES=msxml3=n
> + WINEDLLOVERRIDES=msxml3=n
> # find the x window server location at [current
> machine]:[displaynumber=0]:[screennumber=0] to run x window application
> # used in crontab schedule part of navicat
> export DISPLAY=":0.0"
> + export DISPLAY=:0.0
> + DISPLAY=:0.0
cont’d in next post


Ski_K2

Ski_K2’s Profile: http://forums.opensuse.org/member.php?userid=6818
View this thread: http://forums.opensuse.org/showthread.php?t=404918

schedule.log cont’d

> # create directories
> -d “$WINEPREFIX” ] || mkdir -p “$WINEPREFIX”
> + ‘’ -d /home/pathp/.navicat ‘]’
> -d “$WINEPREFIX/drive_c” ] || mkdir -p “$WINEPREFIX/drive_c”
> + ‘’ -d /home/pathp/.navicat/drive_c ‘]’
> -d “$WINEPREFIX/drive_c/Program Files” ] || mkdir -p
> “$WINEPREFIX/drive_c/Program Files”
> + ‘’ -d ‘/home/pathp/.navicat/drive_c/Program Files’ ‘]’
> -d “$WINEPREFIX/drive_c/windows” ] || mkdir -p
> “$WINEPREFIX/drive_c/windows”
> + ‘’ -d /home/pathp/.navicat/drive_c/windows ‘]’
> -d “$WINEPREFIX/drive_c/windows/temp” ] || mkdir -p
> “$WINEPREFIX/drive_c/windows/temp”
> + ‘’ -d /home/pathp/.navicat/drive_c/windows/temp ‘]’
> -d “$WINEPREFIX/drive_c/windows/inf.done” ] || mkdir -p
> “$WINEPREFIX/drive_c/windows/inf.done”
> + ‘’ -d /home/pathp/.navicat/drive_c/windows/inf.done ‘]’
> -d “$WINEPREFIX/dosdevices” ] || mkdir -p “$WINEPREFIX/dosdevices”
> + ‘’ -d /home/pathp/.navicat/dosdevices ‘]’
>
> # check integrity of system directories
> for system_dir in
> drive_c/windows/fonts
> drive_c/windows/inf
> drive_c/windows/system
> drive_c/windows/system32
> ; do
> if -h “$WINEPREFIX/$system_dir” ] ; then
> if stat --dereference --format %i "$WINEPREFIX/$system_dir" =
> stat --dereference --format %i "$navicat_root/wine/$system_dir" ] ;
> then
> continue;
> fi
> -d “$WINEPREFIX/$system_dir” ] || rm -f
> “$WINEPREFIX/$system_dir”
> fi
>
> -d “$WINEPREFIX/$system_dir” ] || ln -s
> “$navicat_root/wine/$system_dir” “$WINEPREFIX/$system_dir”
>
> done
> + for system_dir in drive_c/windows/fonts drive_c/windows/inf
> drive_c/windows/system drive_c/windows/system32
> + ‘’ -h /home/pathp/.navicat/drive_c/windows/fonts ‘]’
> stat --dereference --format %i “$WINEPREFIX/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/drive_c/windows/fonts
> stat --dereference --format %i “$navicat_root/wine/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/wine/drive_c/windows/fonts
> + ‘’ 1425989 = 1425989 ‘]’
> + continue
> + for system_dir in drive_c/windows/fonts drive_c/windows/inf
> drive_c/windows/system drive_c/windows/system32
> + ‘’ -h /home/pathp/.navicat/drive_c/windows/inf ‘]’
> stat --dereference --format %i “$WINEPREFIX/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/drive_c/windows/inf
> stat --dereference --format %i “$navicat_root/wine/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/wine/drive_c/windows/inf
> + ‘’ 1425994 = 1425994 ‘]’
> + continue
> + for system_dir in drive_c/windows/fonts drive_c/windows/inf
> drive_c/windows/system drive_c/windows/system32
> + ‘’ -h /home/pathp/.navicat/drive_c/windows/system ‘]’
> stat --dereference --format %i “$WINEPREFIX/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/drive_c/windows/system
> stat --dereference --format %i “$navicat_root/wine/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/wine/drive_c/windows/system
> + ‘’ 1425996 = 1425996 ‘]’
> + continue
> + for system_dir in drive_c/windows/fonts drive_c/windows/inf
> drive_c/windows/system drive_c/windows/system32
> + ‘’ -h /home/pathp/.navicat/drive_c/windows/system32 ‘]’
> stat --dereference --format %i “$WINEPREFIX/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/drive_c/windows/system32
> stat --dereference --format %i “$navicat_root/wine/$system_dir”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/wine/drive_c/windows/system32
> + ‘’ 1425999 = 1425999 ‘]’
> + continue
>
> # create Navicat directories
> -h “$WINEPREFIX/Navicat” ] && rm -f “$WINEPREFIX/Navicat”
> + ‘’ -h /home/pathp/.navicat/Navicat ‘]’
> -d “$WINEPREFIX/Navicat” ] || mkdir -p “$WINEPREFIX/Navicat”
> + ‘’ -d /home/pathp/.navicat/Navicat ‘]’
> (cd “$navicat_root/Navicat”;
> for x in * ; do
> oldlink=“pwd/$x”
> newlink=“$WINEPREFIX/Navicat/$x”
> if -h “$newlink” ] ; then
> if stat --dereference --format %i "$oldlink" = `stat

–dereference --format %i “$newlink”` ] ; then
> continue;
> fi
> -d “$newlink” ] || rm -f “$newlink”
> fi
>
> -d “$newlink” ] || ln -s “$oldlink” “$newlink”
>
> done
> )
> + cd /home/pathp/Navicat/Navicat
> + for x in ‘
> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/Navicat.exe
> + newlink=/home/pathp/.navicat/Navicat/Navicat.exe
> + ‘’ -h /home/pathp/.navicat/Navicat/Navicat.exe ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/Navicat/Navicat.exe
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/Navicat/Navicat.exe
> + ‘’ 1425955 = 1425955 ‘]’
> + continue
> + for x in '

> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/help
> + newlink=/home/pathp/.navicat/Navicat/help
> + ‘’ -h /home/pathp/.navicat/Navicat/help ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i /home/pathp/Navicat/Navicat/help
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i /home/pathp/.navicat/Navicat/help
> + ‘’ 1425411 = 1425411 ‘]’
> + continue
> + for x in ‘
> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/libeay32.dll
> + newlink=/home/pathp/.navicat/Navicat/libeay32.dll
> + ‘’ -h /home/pathp/.navicat/Navicat/libeay32.dll ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/Navicat/libeay32.dll
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/Navicat/libeay32.dll
> + ‘’ 1425952 = 1425952 ‘]’
> + continue
> + for x in '

> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/libmysql_c.dll
> + newlink=/home/pathp/.navicat/Navicat/libmysql_c.dll
> + ‘’ -h /home/pathp/.navicat/Navicat/libmysql_c.dll ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/Navicat/libmysql_c.dll
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/Navicat/libmysql_c.dll
> + ‘’ 1425953 = 1425953 ‘]’
> + continue
> + for x in ‘
> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/license.txt
> + newlink=/home/pathp/.navicat/Navicat/license.txt
> + ‘’ -h /home/pathp/.navicat/Navicat/license.txt ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/Navicat/license.txt
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/Navicat/license.txt
> + ‘’ 1425954 = 1425954 ‘]’
> + continue
> + for x in '

> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/logs
> + newlink=/home/pathp/.navicat/Navicat/logs
> + ‘’ -h /home/pathp/.navicat/Navicat/logs ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i /home/pathp/Navicat/Navicat/logs
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i /home/pathp/.navicat/Navicat/logs
> + ‘’ 1434109 = 1434109 ‘]’
> + continue
> + for x in ‘
> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/ntunnel_mysql.php
> + newlink=/home/pathp/.navicat/Navicat/ntunnel_mysql.php
> + ‘’ -h /home/pathp/.navicat/Navicat/ntunnel_mysql.php ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/Navicat/ntunnel_mysql.php
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/Navicat/ntunnel_mysql.php
> + ‘’ 1425956 = 1425956 ‘]’
> + continue
> + for x in '

> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/profiles
> + newlink=/home/pathp/.navicat/Navicat/profiles
> + ‘’ -h /home/pathp/.navicat/Navicat/profiles ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i /home/pathp/Navicat/Navicat/profiles
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/Navicat/profiles
> + ‘’ 1434106 = 1434106 ‘]’
> + continue
> + for x in ‘*’
> pwd
> ++ pwd
> + oldlink=/home/pathp/Navicat/Navicat/ssleay32.dll
> + newlink=/home/pathp/.navicat/Navicat/ssleay32.dll
> + ‘’ -h /home/pathp/.navicat/Navicat/ssleay32.dll ‘]’
> stat --dereference --format %i “$oldlink”
> ++ stat --dereference --format %i
> /home/pathp/Navicat/Navicat/ssleay32.dll
> stat --dereference --format %i “$newlink”
> ++ stat --dereference --format %i
> /home/pathp/.navicat/Navicat/ssleay32.dll
> + ‘’ 1425957 = 1425957 ‘]’
> + continue
>
> # create wine emulated devices
> if -h “$WINEPREFIX/dosdevices/c:” ] ; then
> -d “$WINEPREFIX/dosdevices/c:” ] || rm -f
> “$WINEPREFIX/dosdevices/c:”
> fi
> + ‘’ -h /home/pathp/.navicat/dosdevices/c: ‘]’
> + ‘’ -d /home/pathp/.navicat/dosdevices/c: ‘]’
> -d “$WINEPREFIX/dosdevices/c:” ] || ln -s “$WINEPREFIX/drive_c/”
> “$WINEPREFIX/dosdevices/c:”
> + ‘’ -d /home/pathp/.navicat/dosdevices/c: ‘]’
>
> if -h “$WINEPREFIX/dosdevices/z:” ] ; then
> -d “$WINEPREFIX/dosdevices/z:” ] || rm -f
> “$WINEPREFIX/dosdevices/z:”
> fi
> + ‘’ -h /home/pathp/.navicat/dosdevices/z: ‘]’
> + ‘’ -d /home/pathp/.navicat/dosdevices/z: ‘]’
> -d “$WINEPREFIX/dosdevices/z:” ] || ln -s /
> “$WINEPREFIX/dosdevices/z:”
> + ‘’ -d /home/pathp/.navicat/dosdevices/z: ‘]’
>
> if -h “$WINEPREFIX/dosdevices/y:” ] ; then
> -d “$WINEPREFIX/dosdevices/y:” ] || rm -f
> “$WINEPREFIX/dosdevices/y:”
> fi
> + ‘’ -h /home/pathp/.navicat/dosdevices/y: ‘]’
> + ‘’ -d /home/pathp/.navicat/dosdevices/y: ‘]’
> if -d “$HOME” ] ; then
> -d “$WINEPREFIX/dosdevices/y:” ] || ln -s “$HOME”
> “$WINEPREFIX/dosdevices/y:”
> fi
> + ‘’ -d /home/pathp ‘]’
> + ‘’ -d /home/pathp/.navicat/dosdevices/y: ‘]’
>
> # hide error/stdout message
> if test “z$WINEDEBUG” = z ; then
> exec >/tmp/navicat.output 2>&1
> fi
> + test z = z
> + exec


Ski_K2

Ski_K2’s Profile: http://forums.opensuse.org/member.php?userid=6818
View this thread: http://forums.opensuse.org/showthread.php?t=404918