I have to submit tickets to alter job scheduling, so rather than a walk through of the GUI I try to update msdb..sysschedules via tsql script. I always see the alterations immediately via the GUI. The first time I used this method though, it took a day for the changes to propagate. More recently it's been longer. I suspect something's cached in agent/scheduler, but I can't find documentation on what to do to flush this in the least intrusive manner on a production system. I was hoping something rudimentary like disable/enable the job would trigger a refresh, but it did nothing and I'd rather issue something in T-SQL with my tickets to ensure changes get used. I've requested a restart of agent when nothing's on the horizon to see if that works, but ideally would prefer something less intrusive. This is a 2014 instance.
A sample script:
USE msdb; update s set s.freq_subday_interval=3 from msdb..sysjobs j left join msdb..sysjobschedules js on j.job_id = js.job_id left join msdb..sysschedules s on js.schedule_id = s.schedule_id where j.name ='SomeDb.RunMeEvery3MinsBusta';
I guess taking from answers provided I tested below and it seems to cascade immediately. Just wanted to make it a little more dynamic.
declare @jobid nvarchar(50), @scheduleid int select @jobid=j.job_id,@scheduleid=s.schedule_id from msdb..sysjobs j left join msdb..sysjobschedules js on j.job_id = js.job_id left join msdb..sysschedules s on js.schedule_id = s.schedule_id where j.name ='test'; EXEC msdb.dbo.sp_attach_schedule @job_id=@jobid,@schedule_id=@scheduleid EXEC msdb.dbo.sp_update_schedule @schedule_id=@scheduleid, @freq_subday_interval=1 GO