Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Danny Stringer — — source: Informix-list mailing list archive (1991-1998)
>The following ksh script works well in command line.
>But not work in crontab, why?
>
>-----------------------------------------------------------------------
>#!/bin/ksh
>
># Informix back up logical log and will create a file logical.log
>
>ontape -a << EOF>^M
>y^M
>EOF
>
># where ^M is return input in vi by type ctrl-V and Enter
>sleep 3
>
>hour=`date +%H`
>
>if [[ $hour -ge 9 && $hour -lt 12 ]]
>then cp logical.log logical_tape1.log
>else cp logical.log logical_tape2.log
>fi
>cat /dev/null > logical.log
>-------------------------------------------------------------------
>The above script runs perfectly if on command line. But when I schedual
>in the crontab, I always got 0 (zero) size of logical_tape1/2.log. It
>seems
Why are you testing the time when it's run at a specific time from cron
anyway ???
do you not trust cron to get the time right ???
Danny Stringer
Systems Administrator
Ozemail Australia
dstringe1@ozemail.com.au
http://www.ozemail.com.au
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.