Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to change a Trans-SQL JOB interval programmatically using Java?

 
Thiagu Sin
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

Is there any way to update an existing Trans-SQL Job's interval programmatically?? Kindly help me out.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can just call the relevant system stored procedures I think - from memory it's sp_add_schedule (or something similar) to schedule agent jobs.
 
Thiagu Sin
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Sturrock wrote:You can just call the relevant system stored procedures I think - from memory it's sp_add_schedule (or something similar) to schedule agent jobs.


So, once I create a schedule, I can assign the schedule to a particular job and alter the interval dynamically using this procedure sp_update_schedule ???
 
Thiagu Sin
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thiagu Sin wrote:
Paul Sturrock wrote:You can just call the relevant system stored procedures I think - from memory it's sp_add_schedule (or something similar) to schedule agent jobs.


So, once I create a schedule, I can assign the schedule to a particular job and alter the interval dynamically using this procedure sp_update_schedule ???



Hey Paul, it worked.....Thank you very much for the help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic