0

I'm trying to create a python script on a linux box that can execute an agent job.

Looking around I found sp_start_job command. But it doesn't seem to exist on python.

Does any one know if it does work on python or any other scripting language executable on linux.

0

It does work.

It would python but in the end decided to do it with bash with FreeTDS like this:

~$TDSVER=8.0 tsql -H serverIPaddress -p portnumber -U domain\\username EOS
>EXEC msdb.dbo.sp_start_job @job_name = 'jobname' ;
>GO
>EOS

it will prompt for password...

this can go in to a script to execute (whenever) probably call it from a python script or just schedule with cron.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.