Re: Scheduling SQL statement
Posted in 2000
Topics: Server Administration
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
There are many ways of doing this,
<p>echo "sql stuff" | dbaccess <database name>
<br>E.G.
<br>echo "select count(*) from <what ever you have of tables>" | dbaccess
<database name>
<p>or
<p>cat <filename> | dbaccess <database name>
<br>
<p>Make a test file <testfile> with what you want done
<br>chmod 774 <testfile>
<br>you can test your file with
<br>./<testfile>
<p>Whan this works just
<br>e.g. just put the <testfile> into /etc/cron.daily/ and your job
will be run once a day
<p>If you want to control the time more presice then read about cron ("man
cron"). No longer a Informix question then.
<br>
<p>/Lars
<p>NEWS wrote:
<blockquote TYPE=CITE>Is there a way that I can put SQL statements in a
file and run them from
<br>cron? I am on Informix 5 on SCO. The manuals refer to being
able to supply
<br>a file of inputs instead of going interactive. The programs it
sites are
<br>dbaccess and informix-sql.
<p>Your assistance is greatly appreciated.
<p>Also, I am paritculary interested in knowing if anyone has Apache running
on
<br>SCO linking into Informix data tables.
<p>-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
<br><a href="http://www.newsfeeds.com">http://www.newsfeeds.com</a> - The
#1 Newsgroup Service in the World!
<br>-----== Over 80,000 Newsgroups - 16 Different Servers! =-----</blockquote>
</html>
On Tue, 22 Aug 2000 16:46:26 +0200, Lars Hesdorf <larsh@banctec.dk> wrote: In addition to others suggestions: When you execute shell scripts in CRON: 1. you have to put the script in users home dir or write full path to the shell (for example: /usr/informix/cron_scripts/upd_stat_sc) 2. keep in mind that script will be executed with /bin/sh 3. all of users environmet vars must be set in script (for user informix: PATH, INFORMIXDIR, INFORMIXSERVER, ...) Nebojsa