|
-
Apr 29th, 2002, 05:18 AM
#1
SQL Server 7 Question...
I have a VB app that uses SQL Server 7.
The app creates jobs in the Jobs table, the structure is irrelavant for this Q.
30 days after the job is created it's status is set to cancelled.
In the Sub Main of my app I can run a procedure which checks all jobs and if any are found that are over 30 days old then the app sets the Cancelled field to TRUE.
The problem occurs when another app also uses the data in the jobs table. If someone doesn't run the main app then jobs which are greater than 30 days will still be shown as being effective.
Does SQL Server have an event where I can set it to run at Midnight everyday. This event would run a stored procedure which would automatically cancel jobs...Anyone know if this is possible???
-
Apr 29th, 2002, 05:23 AM
#2
Hyperactive Member
Can't you get the 'other App' to do the cancelled thingy as well?
-
Apr 29th, 2002, 05:25 AM
#3
My house is as small as the moon...
Errr...nope. There are 2 other apps which reference this table, but only one app administers it. Doing an event in SQL Server is far more reliable than copying code from one app to another, then to another...espescially if the functionality changes...
-
Apr 29th, 2002, 05:28 AM
#4
Fanatic Member
In SQL Server Enterprise Manager, open the Management tree node for your server, select SQL Server Agent, Jobs.
In here you can specify scheduled events, like running SPs at specific times...........
Think this is what you are looking for!
-
Apr 29th, 2002, 05:53 AM
#5
Spot on Mr Spot....
Yup, that's exactally what I wanted...
Cheers.
I love this web site
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|