I have a requirement that if a recurring job fails it should disable itself so it does not run again until the problem is fixed. To test this I created a simple job that has 1 step that runs a proc that updates the sysjobs table in msdb. The job is scheduled to run every 2 minutes. When I check sysjobs the job shows as disabled (enabled = 0) if I refresh the Jobs list in management studio it has the little red disabled icon, but the job continues running.
If I open the job in SSMS and tick the enable check box and save then re-open it and un-tick it and save, the job stops running. I have looked at the tables before and after and I can't see a difference in when I disable in a script or disable using the UI.
Does anyone know what piece I am missing here?