Hi Dahman,
I created a batch file which would call a simple python file "Hello World". This python file would print "hello world" infinitely. When I executed the tile, I could see cmd.exe , py.exe and python.exe getting launched in windows task manager. So i guess its working with a simple python file. But when i trigger the actual python script which have few arguments its not working. I dont see any py.exe or python.exe getting launched in task manager. This program is supposed to merge N number of spreadsheets in a specific folder, add/rearrange columns, sort a particular column and finally write it to XL and CSV files. I dont see these files getting generated when tile is executed. But this program works fine when published from datamaker.
Note that the only difference between Helloworld program and actual program is that I am passing arguments in the later.
Code in Hello.bat (works) -
cmd /c "C:\Windows\py.exe D:\Teller21\Hello.py"
Code in MergeFile.bat (doesnt work) -
cmd /c "C:\Windows\py.exe D:\Teller21\MergeFiles.py SIT 0101 CD"
------------------------------
Thanks,
Prasad
------------------------------
Original Message:
Sent: 06-08-2021 01:17 PM
From: Abderrahmane Zahrir
Subject: Triggering python script from CA TDM Portal (tile)
Can you check if python is called at all by creating a batch file and see if there are issues with the python not being in the path when run from the service account
You can also call python providing the full path and use a simple python script like hello world
Regards, Dahman
This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.
Original Message:
Sent: 6/8/2021 12:03:00 PM
From: Prasad Raghu
Subject: RE: Triggering python script from CA TDM Portal (tile)
Hi Dahman,
As you mentioned I am running CA TDM portal service using my logon id. (Restarted service after adding my logon id). My id has complete privileges to execute python script. I also verified using windows task scheduler using my id and the script was executed successfully. Here are the screenshots of the changes made.
Could you please let me know what else can be tried to execute Python script from CA TDM portal?
------------------------------
Thanks,
Prasad
Original Message:
Sent: 06-08-2021 02:51 AM
From: Abderrahmane Zahrir
Subject: Triggering python script from CA TDM Portal (tile)
Hi Prasad,
As the portal runs as a service, you should run your python script under the same service account as the portal. By default, the portal uses the System service account.
You can use the windows scheduler to start your python script to test and run it under a Service account (maybe a user rather than a system account). When you confirm that it works then you can use TDM.
Regards, Dahman
This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.
Original Message:
Sent: 6/7/2021 6:38:00 PM
From: Prasad Raghu
Subject: Triggering python script from CA TDM Portal (tile)
Hi,
I would like to know how to execute python script .py from CA TDM portal as post publish action. I created an post publish action in datapool (code type: HOST) and provided the following code - cmd /c "py D:\Path\MergeFiles.py SIT 0101 CD" in datamaker. When I publish this datapool this python script gets executed. However when create a tile using this datapool and execute from CA TDM portal, it doesnt execute the python script. I verified that the environment variables, python.exe location is added in PATH variable and .py is added in PATHEXT variable.
I am not sure it wouldnt work from CA TDM portal.
I have tried both cmd /c "py D:\Path\MergeFiles.py SIT 0101 CD" as well as py D:\Path\MergeFiles.py SIT 0101 CD.
Kindly help.
------------------------------
Thanks,
Prasad
------------------------------