SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Job Enabled and Schedule Enabled confusion


Job Enabled and Schedule Enabled confusion

Author
Message
phrankbooth
phrankbooth
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 Visits: 179
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!
homebrew01
homebrew01
SSCarpal Tunnel
SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)

Group: General Forum Members
Points: 4787 Visits: 9108
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 ??



phrankbooth
phrankbooth
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 Visits: 179
I'm absolutely sure about it. I ran a Trace on it.
homebrew01
homebrew01
SSCarpal Tunnel
SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)

Group: General Forum Members
Points: 4787 Visits: 9108
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 ?



phrankbooth
phrankbooth
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 Visits: 179
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.
Jon.Morisi
Jon.Morisi
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1161 Visits: 1142
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?
Jon.Morisi
Jon.Morisi
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1161 Visits: 1142
Try restarting sql server agent service after disabling the job...seems to work for me.
Lynn Pettis
Lynn Pettis
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39025 Visits: 38510
Are you disabling the job via the GUI or code? If code, please show the code.

Cool
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)
Jon.Morisi
Jon.Morisi
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1161 Visits: 1142
GUI
homebrew01
homebrew01
SSCarpal Tunnel
SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)

Group: General Forum Members
Points: 4787 Visits: 9108
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



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search