473,385 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Automatical enable and disable a task center task

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
1 1982

<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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: DBQueen | last post by:
I have a form with lines of controls. On some of the lines there are 3 controls (call them A,B,C); other lines have only control A. The controls have been numbered sequentially (Q20, Q21....Q76)...
3
by: Kevin Bilbee | last post by:
I need to know the API call to disable the CTRL-ALT-DEL in a C# windows form. We have created a time clock application to run on a tablet PC to replace the windows shell, we are going to hang it...
4
by: mabond | last post by:
Does anyone know some code that will allow me to enable and/or disable a task which already exists in the task scheduer. I have a task which runs at 15 min intervals and from time to time I want to...
3
by: Donald A. Fisher | last post by:
Hello. I've been working a vb project and have a form with a button on it that performs some actions after disabling the button when clicked: Code disabling button and starting actions: Private...
0
by: dhaval0011 | last post by:
Hi, Does anyone know some code that will allow me to enable and/or disable a task which already exists in the task scheduer. This topic has already been discussed in this forum, and also Mr....
0
by: dhaval0011 | last post by:
How to Enable/Disable a task from task scheduler -------------------------------------------------------------------------------- Hi, Does anyone know some code that will allow me to enable...
0
by: dhaval0011 | last post by:
Hi, Does anyone know some code that will allow me to enable and/or disable a task which already exists in the task scheduer. This topic has already been discussed in this forum, and also Mr....
0
by: jason.richard | last post by:
Hi Does anyone know how to disable and enable ConfirmButtonExtender, using Javascript? I don't want the ConfirmButtonExtender to be enable until a change to a text box has been made. Here...
1
by: rash007 | last post by:
I am building up a table in php built from an array in a database. I can assign each row its own id's etc. But I need to enable or disable checkbox buttons and a text area depending on the checkbox...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.