Forum Discussion

scmadden's avatar
scmadden
New Contributor
5 years ago

Run a SQL Job from JScript

I need to simply run a SQL Server Agent job. I don't need to return values; it is more of a middle man job. Could I do something like this:

var SJob;

var Sjob.ConnectionString = "all the stuff that goes in here...";

SJob.ProcedureName = "SendJobs";

SJob.ExecProc();

 

Or would I be going about this incorrectly? 

    • scmadden's avatar
      scmadden
      New Contributor

      Well, I haven't yet. Can't extend my trial either. Should get a license next week. It should work for an actual stored procedure, but this is for a job...