ImportTasks method under %SYS.Task Class is not working for me
Hi, My python code to import a task is as below –
# dont disturb below lines
import irisnative
hostname = "127.0.0.1"
port = 1972
namespace = "%SYS" #change the namespace based on situation
username = "_SYSTEM"
password = "xxxxxxxx"
logfile = "exetask.log"
connection = irisnative.createConnection(hostname, port, namespace, username, password)
dbnative = irisnative.createIris(connection)
# dont disturb upto here
print("Importing LIS Backup Task")
imptask = dbnative.classMethodValue('%SYS.Task','ImportTasks(FileName = "F:\ZBackup\LISBackupTask.xml",qspec = "d")')
print("After Import LIS Backup Task: ",imptask)
# dont disturb below lines
connection.close()
# dont disturb upto here
The same LISBackupTask.xml I am able to load from Management portal. But when I use this class method the task is not getting loaded. Please suggest any solution to this problem.