Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Job Enabled and Schedule Enabled confusion Expand / Collapse
Author
Message
Posted Thursday, February 5, 2009 8:24 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, June 19, 2014 2:03 PM
Points: 24, Visits: 166
Hello,

I can't seem to reconcile this and can't find a clear explanation on it.

I have a Job set up with a Recurring schedule.

When both Job and its Schedule are Enabled, the Job will run normally.
When Job is Enabled but Schedule isn't, the Job will not run.
When Job is Disabled but the Schedule is Enabled, the Job runs.

I don't get how the Job can be Disabled yet still run when its Schedule is Enabled.

What is the purpose then of Enabling a Job is the Schedule is what controls if it runs or not?

Thanks!
Post #650924
Posted Thursday, February 5, 2009 8:50 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, August 22, 2014 12:24 PM
Points: 2,829, Visits: 8,477
phrankbooth (2/5/2009)
Hello,

I can't seem to reconcile this and can't find a clear explanation on it.

I have a Job set up with a Recurring schedule.

When both Job and its Schedule are Enabled, the Job will run normally.
When Job is Enabled but Schedule isn't, the Job will not run.
When Job is Disabled but the Schedule is Enabled, the Job runs.

I don't get how the Job can be Disabled yet still run when its Schedule is Enabled.

What is the purpose then of Enabling a Job is the Schedule is what controls if it runs or not?

Thanks!


".. When Job is Disabled but the Schedule is Enabled, the Job runs.."

Sounds wrong .... Are you sure about that ??



Post #650951
Posted Thursday, February 5, 2009 9:01 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, June 19, 2014 2:03 PM
Points: 24, Visits: 166
I'm absolutely sure about it. I ran a Trace on it.
Post #650964
Posted Thursday, February 5, 2009 9:46 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, August 22, 2014 12:24 PM
Points: 2,829, Visits: 8,477
I've never encountered that. It shows disabled in the GUI ? Does the "Last Run" get updated afterwards ?
If you look at the "enabled" field in msdb..sysjobs, what do you see ?



Post #651025
Posted Thursday, February 5, 2009 12:10 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, June 19, 2014 2:03 PM
Points: 24, Visits: 166
GUI and DB settings are as expected.

I have done manual runs atkleast 10 times and same results, Schedule must be Disabled to stop Job.
Post #651168
Posted Tuesday, April 20, 2010 9:42 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, August 10, 2014 4:15 AM
Points: 293, Visits: 816
I'm having the same issue, job disabled, schedule enabled, job runs.
(I'm running sql 2008 sp1)

My jobs were created via a maintenance plan, were yours too?
Post #906987
Posted Tuesday, April 20, 2010 10:03 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, August 10, 2014 4:15 AM
Points: 293, Visits: 816
Try restarting sql server agent service after disabling the job...seems to work for me.
Post #907012
Posted Tuesday, April 20, 2010 10:09 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 8:19 PM
Points: 23,286, Visits: 32,012
Are you disabling the job via the GUI or code? If code, please show the code.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #907016
Posted Tuesday, April 20, 2010 10:27 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, August 10, 2014 4:15 AM
Points: 293, Visits: 816
GUI
Post #907045
Posted Tuesday, April 20, 2010 11:36 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, August 22, 2014 12:24 PM
Points: 2,829, Visits: 8,477
You can generate the code. Open the job, uncheck the "enabled" button, then "Script to new window"

I can't replicate that in 2005. Tried a "regular" job and a maint plan job. Don't recall it ever happening either.

You could query these tables for that specific job and see what the enabled values are:
sysjobs
sysjobschedules
sysschedules



Post #907112
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse