run database jobs on button click

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,

does anyone have an idea how to access and run scheduled jobs in sqlserver
database using just a button click?can anyone point me to the right resources.

Thanks,

Ads
 
You don't want to access and run a _scheduled_ job - otherwise, what's the
point of it being scheduled!

What you can do, is execute sp_start_job instead.

Example straight from SQL Server Books OnLine:

EXEC sp_start_job @job_name = 'Nightly Backup'


Call that from a SqlCommand object.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top