Hi , I would like to create a SQL Agent Job which should run every one hour after the Job is being triggered. The Job will be triggered manually in SQL Server Agent and should run every one hour from the time it is triggered. I would also script out this job creation script. Kindly let me know your thoughts. Thanks Kanna
You can do this by using sp_update_jobschedule. Make the first step a TSQL step that will adjust the corresponding job schedule to execute at the appropriate time. Given that the job will be launched manually, you'll also have to enable the schedule so that it'll run automatically once it's initially launched. Reference:
https://technet.microsoft.com/en-us/library/ms178560(v=sql.110).aspx I would build out the job & schedule within the UI and then script it out. Hope that helps!