powerServer 2020
I can send a commandline to start a process in my powerserver application:
something like this:
https://mywebserver.com/?/U myuuser /P mypwrd /R exportfile {"rptl_cd":"xyz","format":"CSV","file":"c:\temp\myfile[MMDDhhmmssss00].csv"}
when i manually copy that into a browser (edge, chrome, etc). it runs the process fine.
I need to run this from a scheduler.
-----------------------------------------------
powershell:
I have a powershell script that sends the command, but stops immediately. It returns status code 200 and appears to exit out without waiting for the powerserver application to finish the process. does not work on either scheduler or command line (both just return 200 without doing the process)
powershell -ExecutionPolicy Bypass -Command Invoke-WebRequest -UseBasicParsing 'http://mywebserver.com/?/U myuuser /P mypwrd /R exportfile {"rptl_cd":"xyz","format":"CSV","file":"c:\temp\myfile[MMDDhhmmssss00].csv"}'
--------------------------------
the start command
start https://mywebserver.com/?/U%20myuuser%20/P%20mypwrd%20/R%20exportfile %20{"rptl_cd":"xyz","format":"CSV","file":"c:\temp\myfile[MMDDhhmmssss00].csv"}
works from the command line, but doesn't from the scheduler: (scheduler runs it, says everything is good, but the file does not get saved out, scheduler is run under my user account).
(Note that %20 must be used instead of spaces for the command line to the web address)
cmd /c
start https://mywebserver.com/?/U%20myuuser%20/P%20mypwrd%20/R%20exportfile %20{"rptl_cd":"xyz","format":"CSV","file":"c:\temp\myfile[MMDDhhmmssss00].csv"}
anyone have any ideas? anyone else run a command line process to PS 2020 or prior from a scheduler?