By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,610 Members | 1,672 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,610 IT Pros & Developers. It's quick & easy.

Automatical enable and disable a task center task

P: n/a
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?

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

<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
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.