|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Sep 2020
Location: South Carolina
Device: Android Moto G Power, Kindle, iPad, Windows PC
|
When Calibre fails from a command line, it doesn't complain or set the RC
When Calibre is started or stopped from the command line, if it has an error,, it just doesn't complain or set an error / return code. In the example below, I'm using a known issue stemming from Windows 10's security "enhancements" where the calibre --s command doesn't work from a users command window, IF Calibre was started via the Task Scheduler.
C:\WINDOWS\system32>"D:\Program Files\Util\pslist64.exe" calibre -nobanner Process information for HP-PRIME: Name Pid Pri Thd Hnd Priv CPU Time Elapsed Time calibre 17768 6 21 712 254852 0:00:35.515 8:20:31.698 calibre-parallel 29200 8 1 163 10084 0:00:00.140 8:17:01.612 C:\WINDOWS\system32>calibre --s C:\WINDOWS\system32>echo %errorlevel% 0 C:\WINDOWS\system32>"D:\Program Files\Util\pslist64.exe" calibre -nobanner Process information for HP-PRIME: Name Pid Pri Thd Hnd Priv CPU Time Elapsed Time calibre 17768 6 21 712 254852 0:00:35.578 8:21:10.877 calibre-parallel 29200 8 1 163 10084 0:00:00.140 8:17:40.791 No complaint, and the return code is set to zero. I've noticed similar behavior if I start Calibre and it encounters an error. Again, it just dies without a whimper. My concern is not the failure. I just used it as an example. I just would like some way to verify that the command was properly executed or encountered an error. Thanks! |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Is the calibre that is run from the Task Scheduler running under the same user?
When I use "calibre-debug -s", and no calibre is running, I get: Code:
C:\Users\davidfor>calibre-debug -s Failed to contact running instance of calibre Failed to connect to Listener at: \\.\pipe\CalibreGUI-davidforx with error: QLocalSocket::connectToServer: Invalid name And I don't consider the above to be an error. The message could be cleaner, but, that is a valid result when there is nothing to shutdown. If the listener was found and the shutdown didn't happen, that would be a different matter. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,303
Karma: 168808723
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
One question is why the OP is using --s when the documentation shows a single dash for the one character commands? I.e, -s or --shutdown-running-calibre work to kill Calibre on my system but --s does nothing.
On another hand, quite a few of the command line options do not seem to do anything on a Windows system (i.e. -h or --help, --version) unless I use calibre-debug instead of calibre. |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Sep 2020
Location: South Carolina
Device: Android Moto G Power, Kindle, iPad, Windows PC
|
I guess my concern is that when Calibre commands fail, it doesn't seem to set the %errorlevel% so there's nothing to test.
Meanwhile, I'll see if Calibre-debug or the single hyphens fix the immediate issue. THANKS! |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to set [fetch news]-[delete downloaded nenws older than * days] with command line | Aoxd3p4 | Library Management | 2 | 12-02-2019 03:04 AM |
calibre command line | mahargiani | Recipes | 2 | 11-15-2019 01:21 AM |
GUI works, command line fails | endo32 | Conversion | 1 | 06-17-2017 10:05 PM |
Calibre with command line ? | Laurent06 | Conversion | 2 | 11-09-2014 12:37 AM |
Calibre Server runs on command line, fails in GUI | gregoryx | Calibre | 0 | 08-21-2011 06:14 PM |