My company uses a job scheduler called JAMS and we've have been trying to basically replace our Publisher (QEMC) tasks with JAMS jobs. We use JAMS to execute PowerShell script - passing parameters to the script containing the path and filename of the QVW file and the command line arguments (usually just /r to Reload, Save, and Close, and sometimes /v if we need to pass a variable).
We've been successful with simple QVWs that are just QVD file builders, since they do not need to be distributed to the AccessPoint. However, we have not been successful with "published" apps that need to be distributed to the AccessPoint, put in a particular category on the AccessPoint and have proper security applied so that only certain named users or members of certain Active Directory groups can see them on the AccessPoint.
We've been using JAMS to reload the QVWs and then using a Publisher (QEMC) task to rename the document, distribute to the AccessPoint, categorize, handle security, etc. So we used to have a lot of "Reload and Distribute" Publisher tasks. Now we have reload jobs scheduled in JAMS and Distribute tasks scheduled in Publisher. This is not a great setup, particularly because Publisher doesn't "know" when a JAMS reload job has completed. It's not bad for our apps that just need to be refreshed once per day. For example, we can schedule the reload via JAMS at 5 AM and the Distribute task via Publisher at 5:15 AM (if we know that the reload always takes less than 15 minutes). It becomes problematic for QVW files that need to be closer to real-time. In those cases, we may have a chain of events in JAMS to incrementally reload new data, update QVD files and then reload the QVW. But we don't always have a predictable duration for these processes, so we wind up just scheduling Publisher to distribute the QVW every 10 minutes or whatever. Is there a way to trigger an existing QV10 Publisher (QEMC) task from a command line, .bat file or PowerShell so that the documents only get distributed when we know the reload has completed?
The above would be a great next step, but ultimately we would like to be able to eliminate Publisher tasks altogether. Does anyone know if you can use Powershell to do everything I've described? We have reloads figured out and I'm sure Powershell can basically perform a Save-As to rename the document and save it to our AP Distribution folder (which would get it to the AccessPoint). However, that puts the QVD document in a <Default> category and allows all users to see it. If anyone has used PowerShell to put QVWs in a particular AccessPoint category and apply security, I would greatly appreciate some help (examples, sample code, etc.).