Re: Oracle/Unix shell script question...

From: Marc Blum <marc_at_marcblum.de>
Date: Sun, 16 Dec 2001 18:49:35 GMT
Message-ID: <3c1cebbb.2591806_at_news.online.de>


On 12 Dec 2001 12:39:49 +0200, costello_at_iki.fi (Antti =?iso-8859-1?q?J=E4rvinen?=) wrote:

>If you always run your script on saturday and you want to use there
>expression equivalent to "next saturday", you can express it simply
>by saying "sysdate+7" which, if run today, '12-dec-2001' has value of
>'19-dec-2001' e.g. next wednesday, 7 days ahead "sysdate". In some other
>database than Oracle this might work in different way.

But you have to be aware of the facts, that:

  • if the database was down for any reason, when the job had to be executed, Oracle will run it, when the database is up again.
  • Oracle determines the "next time" at the moment just before the job is executed.

Conclusion: you have to build the rule to determine the "next time" in a way, that it always returns the next Saturday, not "today + 7 days"

regards
Marc Blum
mailto:marc_at_marcblum.de
http://www.marcblum.de Received on Sun Dec 16 2001 - 19:49:35 CET

Original text of this message