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.
 
Back
Top