If you set up a scheduled script that runs on the server, can that scheduled script then include "Perform Script on Server" script steps? I would assume yes, but ...
That would be NO. Select Server compatible scripts in the Script Workspace and see it is grayed out.
if PSOS causes a script to run in its own private session on the server AND a scheduled script does the same thing then what benefit would it be to allow a scheduled script to run PSOS? It would be a session inside a session and when the script terminates both sessions terminate.
Great answers already! To clarify (in my own mind), I think like this:
1. There is a script with Server-compatible steps. This script can be called as a scheduled script. Works well, good to go, HOWEVER... This requires the schedule to be set and/or can be run manually, but requires login to the Admin Console (to run manually).
2. OR I can write another script with the step:
Perform Script On Server ...
Which essentially calls the same script called by the schedule, but can be called from the user (by whatever means).
So you have a script that can be scheduled/manual from FMServer OR triggered from client by PSoS.
For some reason all your answers went into my junk folder, just found them.
I should have turned on compatibility viewer ... forgot at the time, sorry.
I have a few buttons set up for running certain lengthy reports via PSOS that used to run client-side and held up the user. The customer asked me to move these report generations from the button-activated user function to a scheduled script. To save time, I just wondered if I could make the scheduled server script simply go to the desired layouts, then execute the button activated scripts that already worked. I had a lot going on that day, sorry ...
A schedule script can do that but it is not PSOS.
A scheduled script can do what but it is not PSOS? Your brevity escapes me ...
Any script whether called by PSoS or set up as scheduled on the server should already have the context. If, perhaps you need to add the context, you can create another script to call your original script. Schedule the new script, instead. But I don't understand how your button could call PSoS without that context already?
Read my original reply (login to see the entire thread, perhaps?)
&ou should have Server compatible script this can be called:
1) locally the PSoS step
2) scheduled or manually run from the admin console.
The script should be the same one. HOW IT IS CALLED IS DIFFERENT. That's why you cannot schedule any script with the PSoS step in it.
Thanks, I understood the first time - actually as soon as chocaholic reminded me to use "compatibility view". I wasn't sure of Tom's point exactly since he seemed to be saying it would work to do what I described as my short-cut approach of executing the button scripts instead of calling the server-compatible scripts directly from the scheduled script.
I always go back to the full discussion for the context.
You're detailed "learning-oriented" discussions are always appreciated.
Retrieving data ...