Screenshots would certainly help, and an explanation of what the task actually does would help as well (Is it a backup, does it export data to a different system, wash the dishes maybe? :-) ). Is it possible that the task may at times take longer than 24 hours to execute? I have seen instances where a process 'hangs' so TaskMan thinks it's still running and doesn't fire up a new instance of that task.
Hope this helps!
OK, I think I figured out a way that seems to work with both spaces & non-spaces in the strings...
You need to use the "Stop Parsing" token available in powershell: --%
With that, and the usual delimiting with double quotes in strings (I couldn't get it working with outer single quotes at the PS command prompt), this does seem to work:
# So, you can run the script this way (at the command line):
.\irissession healthconnect -U user --% "Say^ImplUtil(""""""Your string here"""""")"
and it should work. In your script, you would need to make these modifications:
[string]$TestString = "Test_string_without_spaces"
# or to test with spaces
[string]$TestString = "Test string with spaces"
# In the escape test:
Name = "Double-Triple quotes"
Pattern = 'Say^ImplUtil(""""""' + $TestString + '"""""")'
# and because we're changing how we parse the string when calling it,
# we need to add a secondary stage when parsing the command. In the first
# try loop after the foreach, change your code to this:
$zparams = ' --% ' + $test.Pattern + ' 2>&1'
# Test the pattern
$result = .\irissession $Instance -U user $zparams
# Should be the end of the modifications...
Note: My instances and namespaces are quite a bit different than yours, so I tried to adjust things back to how you had it from my testing, but if I wasn't quite successful, I apologize for any missteps.
Hope this helps!



Ronaldo,
The ChangePassword property isn't for the password, it's to set a flag if the user is supposed to change their password on next login - this property's handy for admins that assign temporary passwords and the user needs to change it to something befitting them on first login. To set the property, it's a simple 'set' like the others:
And to set the initial Password is also a standard 'set':
Also, if the Roles is only %SQL, but if you're testing the login using Terminal, that user doesn't have enough rights for that functionality and you'll probably get an 'Access Denied' error. You'll either need to (temporarily) assign the %All role to that user to test, or just verify that the settings are getting set in the Management Portal.
As to the NameSpace, if the Namespace doesn't exist (typo, I've done that before) or if the user doesn't have enough rights to access that Namespace, it may not be set correctly.
Lastly, here's the documentation for the Security.Users class: https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25SYS&CLASSNAME=Security.Us
Hope this helps!
[[ edit for readability and examples were out of order. ]]