<st**********@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I want to have a script that checks that my databases are up and
running. I just want the scrip to connect to several databases and
check the count of a certain table. I want this script to run every 10
minutes. I know that every night I am taking the database down for
backup and they won't be available and the script will fail.
I have been looking into the systools tables to see what changes when
you make enable/disable a script but there are several changes to
columns and whole rows are inserted and deleted.
My ideal schedule would be run the script every 10 minutes from 3:00am
to 11:00 pm but I can't see how to do that in the script center.
Has anyone done this?
I haven't tried scheduling scripts with the script center so I can't say if
what you want is possible. It certainly sounds like something that the
script center should be able to do but that doesn't mean it _can_ be done.
If you don't get any satisfaction with the script center though and you are
running on Linux or Unix, I think you'll find it quite simple to set up a
job like the one you describe in cron. I have a nightly backup job on our
Linux server, scheduled to back up our databases at 3 AM each night. It
would take me about 30 seconds to modify the cron entry to have it execute
every 10 minutes from 3 AM to 11 PM.
One other point: rather than trying to stop execution of the script when the
database is down for backup, why not do one of these two things:
- do the backup online so that it is not down
- modify the script so that it doesn't fail if the database is down; then
you could run the script even when the database was down and still have it
work. Just have it test for whatever return code results from trying to do a
query when the database is down and gracefully exit without raising an error
if that happens.
Rhino