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


Agent jobs don't run according to schedule


Agent jobs don't run according to schedule

Author
Message
ken.trock
ken.trock
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1253 Visits: 1730
Has anyone seen in SQL 2005 SP3 where agent jobs simply don't abide by a schedule setup? I had a bunch of jobs that needed to kickoff an hour longer so I scripted it.


UPDATE s SET active_end_time = active_end_time + 10000 --Add an hour
FROM msdb..sysschedules s
INNER JOIN msdb..sysjobschedules js ON js.schedule_id = s.schedule_id
INNER JOIN msdb..sysjobs j ON j.job_id = js.job_id
WHERE j.name LIKE 'This_Job_Needs_Another_Hour%' AND j.enabled = 1



I made sure a couple look right in the GUI scheduler. They run every 15 minutes and they're definitely not taking longer than that (which would prohibit the job from running on it's next interval). The SQL Agent logs are clear.

The best I can tell is that the agent service should be bounced.

Thanks,
Ken
telcogod
telcogod
SSC Rookie
SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)

Group: General Forum Members
Points: 49 Visits: 561
HI,

It may be agent SQL Server Agent Job History Log limit is being breached (default is 1000 rows) you can look at msdb..sysjobservers for last run date and time.

HTH - Walter
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (202K reputation)SSC Guru (202K reputation)SSC Guru (202K reputation)SSC Guru (202K reputation)SSC Guru (202K reputation)SSC Guru (202K reputation)SSC Guru (202K reputation)SSC Guru (202K reputation)

Group: General Forum Members
Points: 202763 Visits: 41943
ken.trock (1/9/2013)
Has anyone seen in SQL 2005 SP3 where agent jobs simply don't abide by a schedule setup? I had a bunch of jobs that needed to kickoff an hour longer so I scripted it.


UPDATE s SET active_end_time = active_end_time + 10000 --Add an hour
FROM msdb..sysschedules s
INNER JOIN msdb..sysjobschedules js ON js.schedule_id = s.schedule_id
INNER JOIN msdb..sysjobs j ON j.job_id = js.job_id
WHERE j.name LIKE 'This_Job_Needs_Another_Hour%' AND j.enabled = 1



I made sure a couple look right in the GUI scheduler. They run every 15 minutes and they're definitely not taking longer than that (which would prohibit the job from running on it's next interval). The SQL Agent logs are clear.

The best I can tell is that the agent service should be bounced.

Thanks,
Ken


I believe that it's a bit more complicated than that. You have to change the schedule for the job using the built in procs which will also change the "next run time" in the job table, etc, etc.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
ken.trock
ken.trock
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1253 Visits: 1730
Thanks guys. It looks like having our server support team recycle the SQL Agent service did the trick. All jobs are running through their entire schedules.

Ken
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