Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 is it possible to schedule a job at runtime ?

Author  Topic 

mary_itohan
Posting Yak Master

191 Posts

Posted - 2008-08-30 : 17:46:53
Hello guys,
is it possible to schedule a job or batch at runtime ? either from a calling function or SP, to run at a specified time ?

And if so, how can this be achieved in MS SQL?



Ehi

Yes O !

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2008-08-31 : 00:43:38
are you talking about agent jobs? if so you can configure them completely from t-sql, by calling various procs in msdb.

to create a schedule see msdb.dbo.sp_add_schedule
to attach a schedule to a job see msdb.dbo.sp_attach_schedule


elsasoft.org
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-08-31 : 03:24:44
See this

http://msdn.microsoft.com/en-us/library/aa259582(SQL.80).aspx
http://msdn.microsoft.com/en-us/library/ms186273.aspx
http://msdn.microsoft.com/en-us/library/ms191128.aspx
http://msdn.microsoft.com/en-us/library/ms187320.aspx
Go to Top of Page
   

- Advertisement -