I have multiple commands that I am trying to call from a txt file. They run fine from cmd line. I need to automate this process via SQL Server agent job or python script. How do I call the acli text file from any of those applications? Any help would be much appreciated.
SQL server command: - Failing
EXEC xp_cmdshell 'acli.bat jiradc -a run -f E:\JiraCloud_Files\ACLI_Command_Calls\test_multiple_acli_commands.txt\acli.bat'
Python script:-- Failing
import subprocess
from jira import JIRA
# Path to your batch file
batch_file_path = r'acli.bat jiradc -a run -f E:\JiraCloud_Files\ACLI_Command_Calls\test_multiple_acli_commands.txt' # failed
#batch_file_path = r'C:\full\path\to\your\file\acli.bat'
# Call the batch file using subprocess
#subprocess.run([batch_file_path])
subprocess.run(['acli.bat', 'jiradc', '-a', 'run', '-f', 'E:\JiraCloud_Files\ACLI_Command_Calls\test_multiple_acli_commands.txt'], shell = True)