Job status

Job status

Post by Jon » Thu, 26 Jun 2003 16:58:42



Is there a way to tell if a job is currently executing?  I
have to create a proc that first checks to see if another
job is executing.  If it is, it will need to do different
logic than if the job is not running.
 
 
 

Job status

Post by Drew Seal » Thu, 26 Jun 2003 17:08:05


You can use the procedure sp_help_job to check information regarding
scheduled tasks.  Since all jobs are stored in msdb, you will need to
execute that against that db.  You can find everything you with that proc.
If you want something more specific, just review the text of the procedure
to isolate the information you want.

Hope that helps


Quote:> Is there a way to tell if a job is currently executing?  I
> have to create a proc that first checks to see if another
> job is executing.  If it is, it will need to do different
> logic than if the job is not running.


 
 
 

1. Job Status for scheduled job

Where is the "job" status stored for a scheduled job.

I can see this status in the administrator but want to
be able to provide this status to a user via a different
front end.

I can find the job and the job history, runtime ect ...
where is the "status" stored or is it some calculated
value based on instance ect ...

Thanks
Dan

2. How do I safely get Identity value?

3. Job status from within a job

4. filegroup question!

5. Agent Job Status...

6. Dynamically DeNormalise Normalised data using SQL

7. Job status

8. Msg 7995

9. Job Status

10. viewing job status as a member of targetserverrole in msdb

11. Current Job Status using SQL

12. bug? sql agent: job status = 7

13. How to capture the Job status programatically ?????????