Hi
sp_help_job returns a current_execution_status for the jobs, you can also
pass a @execute_status parameter to sp_help_job a value of 1 is for a
currently executing job. You can see what sp_help_job is doing by looking at
the definition in msdb, if it is sufficient then you can use it as the basis
for your own procedure.
More information on sp_help_job is available on Books online
John
[quoted text, click to view] "Hassan" wrote:
> I've looked at sp_help_job but cant really seem to find out current
> execution status . So basically I want to be able to run a TSQL that will
> list all jobs that are currently running
>
>