Regarding the latest Job status query you have posted, i have tried that but it doesn't gave me the expected result.
Here is what i have done , i have put the T-SQL in the job which will execute infinite times, so the Job Status is In Progress, but when i fired the query of the Job Status it still gives me status as successful.
Is i am going wrong somewhere , here is the query which i have used so that the Job should remain in the In Progress state. When i stop the job it does show me the Canceled status but In Progress it was not showing.
declare @count int
Looking forward for positive response.