[Pe...] Posted August 2, 2023 Share Posted August 2, 2023 Dear Everyone, I created a script that looks through our results folder and archives files based on file age. The script itself is working flawlessly. I decided to use Task Scheduler to automate starting of the script. My problem is if GOM Inspect is started from the Task Scheduler, it doesn't see the license. I attached a few pictures too. The command I'm using is: "C:\Program Files\GOM\2020\bin\start_gom.exe" gom_inspect PRO -eval "import AutoArchive.py" When executing the same command from a command prompt, it does the job fine so I guess it's down to a Task Scheduler setting but I just couldn't figure it out. Currently I'm logged in as admin, and the task is ran as admin too. As it's mentioned in the task desription, I'm killing gom_inspect.exe from another task after 90 minutes (that should be enough) to avoid re-opening issues. Interestingly the killing task also doesn't run, at leat it didn't close the app last night, even though the task history tells me that it was completed (History screenshot is about the killing task). Though I'm also not sure if exit code (2) is good or not. I tried to fill in the "Start in (optional)" field in Task Scheduler, but it didn't help. I'm running GOM Inspect 2020. Does anyone have any idea what am I doing wrong? Beside this, the Scanbox works just fine in every aspect. Thanks in advance, Peter Link to comment Share on other sites More sharing options...
[Fr...] Posted August 10, 2023 Share Posted August 10, 2023 Hello Peter, I think the parameters in the shortcut must be specified in a different way. For example, if I want to start GOM Inspect Pro 2022 from a desktop shortcut with a script, the following works for me: "C:\Program Files\GOM\2022\bin\GOMSoftware.exe" -license gom-inspection-pro -eval "gom.script.userscript.TEST()" Behind "-license" the required licenses must be specified. Otherwise all available licenses will be used automatically. That's why the following also works: "C:\Program Files\GOM\2022\bin\GOMSoftware.exe" -eval "gom.script.userscript.TEST()" In the software 2020 there are sometimes other notations. Maybe one of the following options works for you: "C:\Program Files\GOM\2020\bin\start_gom.exe" -eval "gom.script.userscript.AutoArchive.py()" "C:\Program Files\GOM\2020\bin\start_gom.exe" -license inspect_all -eval "gom.script.userscript.AutoArchive.py()" "C:\Program Files\GOM\2020\bin\start_gom.exe" -license gom-inspection-pro -eval "gom.script.userscript.AutoArchive.py()" "C:\Program Files\GOM\2020\bin\start_gom.exe" -license gom-inspect-pro -eval "gom.script.userscript.AutoArchive.py()" Unfortunately, I no longer have the 2020 software installed. Otherwise I could test it. If a desktop shortcut works in the test, hopefully it should also work with the Task Scheduler. Best regards Frank Link to comment Share on other sites More sharing options...
[Pe...] Posted October 9, 2023 Author Share Posted October 9, 2023 Hello Frank, Sorry for not answering so long, unfortunately non of the above mentioned solutions worked for me. They all work until I put them into Task Scheduler, but then I still have the license error. I have a bunch of other tasks currently so it's a bit out of focus, I'll get back to the topic later. Anyway, thanks for the suggestions! Best wishes, Peter Link to comment Share on other sites More sharing options...
[Ja...] Posted October 9, 2023 Share Posted October 9, 2023 Ive never tried doing this , so this is a stab in the dark , but im wondering if there needs to be a prompt somehow to ensure the codemeter software is accessible. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in