anil tiwari
anil tiwari

Reputation: 195

how to run control m job through python script?

i have a control m job instead of triggering it through control m application i want to trigger through my python script but i don't know how to perform this action is there any module available in python which can trigger control m job and also how can I pass user-id , DNS details and password into it..

Upvotes: 1

Views: 3830

Answers (2)

xgiannak
xgiannak

Reputation: 1

Since the time the other answer was given, suggesting to call REST APIs from Python, a python package has been published.

With the python package, you create Python objects (classes) for the Folder, jobs, and then run it, all directly from Python. Have a look at https://controlm.github.io/ctm-python-client/ for more information.

It allows your code to be more structured, and it is simpler to program it with loops and branches, parameters, and so on.

Upvotes: 0

Erez Ben Harush
Erez Ben Harush

Reputation: 867

It can be done using Control-M Automation API. You can use the following link as a reference for the python code:

https://github.com/controlm/automation-api-quickstart/tree/master/control-m/201-call-rest-api-using-python

You can use the following link to browse the Control-M Swagger documentation:

http://aapi-swagger-doc.s3-website-us-west-2.amazonaws.com/#/run/runNow

It seems like /run/runNow endpoint will do the trick

Upvotes: 2

Related Questions