On Tue, 13 Jul 1999, JT Kirkpatrick wrote:
> i set up the following script to run at 5am daily:
>
> touch /var/log/imgonnadoit.at5
> su svmaster
> psql serviceworks -c 'vacuum;'
> exit
> touch /var/log/ididit.at5
>
> i had planned to ls -l /var/log/i* to see the times of imgonnadoit.at5 and
> ididit.at5 to see if the span looked reasonable -- and therefore if so
> assume that it DID perform the vacuum (i don't know any other way but to be
> there at 5a! -- or run it during the day but that means bringing everyone
> down. . .). the first one (imgonnadoit.at5) shows up right at 05:00, but
> the ididit.at5 never shows up. do you see anything wrong in the script??
>
> thanks! jt
"exit" exits from the shell, so "touch /var/log/ididit.at5" never run.
Rewrite it as:
touch /var/log/imgonnadoit.at5
su svmaster -c "psql serviceworks -c 'vacuum;'"
touch /var/log/ididit.at5
Oleg.
----
Oleg Broytmann http://members.xoom.com/phd2/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.