[RELEASE] Texture Cache Maintenance utility
(2015-10-04, 21:48)Milhouse Wrote:
(2015-10-04, 18:02)pgjensen Wrote: I run your program to update thumbnails for movies/tv when my computer wakes up from sleep, so it can cache newly added items. Kodi is always open, so it has initial focus. When I run the python script via the task scheduler, it minimizes Kodi and shows the python console. I've tried running it as "minimized" in the scheduler, tried running a vbs script with different window settings to keep it minimized, etc, but every time it steals focus and minimizes Kodi.

pythonw.exe would launch your script asynchronously with no output, but I believe your script needs a no output option for that to work properly. If you try to write to stdout/stderr/etc I believe it causes pythonw to silently fail.

You can redirect output to NUL on Windows, or to a file. The following works fine on Windows, with no console:

Code:
pythonw.exe texturecache.py c movies 1>c:\stdout 2>c:\stderr

If you're not interested in the output, redirect stdout and stderr to NUL:
Code:
pythonw.exe texturecache.py c movies 1>NUL 2>NUL

The remaining potential issue is that pythonw executes asynchronously, but that's a general Windows issue with no easy solution if you want to run commands in strict sequence (using third-party/sysinternals tools to polll the process list for the presence of pythonw.exe would be one solution).

PERFECT, thank you!
Reply


Messages In This Thread
Crash on Gotham on OS X - by desepticon - 2014-05-29, 17:57
RE: [RELEASE] Texture Cache Maintenance utility - by pgjensen - 2015-10-05, 01:29
Cleaning - by AleisterHH - 2018-05-28, 22:03
RE: Cleaning - by Milhouse - 2018-05-28, 22:16
qax genre not updated - by Just-Me_A-User - 2018-06-12, 22:06
RE: qax genre not updated - by Milhouse - 2018-06-12, 23:40
Logout Mark Read Team Forum Stats Members Help
[RELEASE] Texture Cache Maintenance utility17