|
|
#1 |
|
Member
![]() Posts: 24
Karma: 10
Join Date: Apr 2010
Device: iPhone, Kindle 3
|
Run Calibre as Task in Windows 7
Is this a limitation of the GUI? Writing BAT files for everything would be very time consuming and I would like to avoid doing that if possible. Any ideas on how I can accomplish this? |
|
|
|
|
|
#2 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,994
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
|
|
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Member
![]() Posts: 24
Karma: 10
Join Date: Apr 2010
Device: iPhone, Kindle 3
|
Just seems like a waste of RAM and procesor cycles for something I need to run 10 min a day at most.
|
|
|
|
|
|
#4 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,994
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Alternatively, you can run calibre's standalone recipe and conversion software from the command line or scheduled batch file, then run a command to add it to the database (assuming you want it in the database), or use a sync program to send it to your reader device after it is created. |
|
|
|
|
|
|
#5 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,854
Karma: 285886
Join Date: Jan 2010
Location: France
Device: Sony PRS-300, HTC WM6.5, Samsung Galaxy Nexus, HTC Sensation
|
Try running 'calibre-debug -g' instead of calibre.
I built a task specification to run a .bat file that sets a few environment variables (because I didn't want the test to touch my real library), then runs calibre-debug -g. It runs it every 5 minutes, killing it after 1. It has been happily doing this for 20 minutes. I haven't tried running it when I am not logged in, so can't say whether not having a screen will cause the GUI difficulties. I suspect that running calibre-debug gives the task scheduler a convenient process to kill. |
|
|
|
|
|
#6 |
|
Member
![]() Posts: 24
Karma: 10
Join Date: Apr 2010
Device: iPhone, Kindle 3
|
So it seems like there is no easy to do it through Task Manager. I'll keep exploring other options and post back.
Thanks! |
|
|
|
|
|
#7 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,854
Karma: 285886
Join Date: Jan 2010
Location: France
Device: Sony PRS-300, HTC WM6.5, Samsung Galaxy Nexus, HTC Sensation
|
Quote:
![]() I used the W7 task manager for my experiment, and it was easy to set up using the wizard and then adjusting a few properties. The only reason I used a .bat file was to set two ENV variables so that the job did not touch my production library. You should be able to directly run calibre-debug, putting the '-g' into the parameters box. Perhaps I don't understand what you are trying to do? |
|
|
|
|
|
|
#8 |
|
Member
![]() Posts: 24
Karma: 10
Join Date: Apr 2010
Device: iPhone, Kindle 3
|
I understand what you're saying, and I really appreciate the advice, but I've tried your suggestion and while it does start I am not able to get it to quit after a set amount of time using the Task Scheduler properties. How are you accomplishing this?
Last edited by nchall114; 04-20-2010 at 07:04 PM. Reason: More detailed explanation. |
|
|
|
|
|
#9 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,854
Karma: 285886
Join Date: Jan 2010
Location: France
Device: Sony PRS-300, HTC WM6.5, Samsung Galaxy Nexus, HTC Sensation
|
I told the task manager to start it after 5 minutes and kill it after 1 minute. To be more precise, I created a trigger tab saying 'begin task on a schedule', 'start one time', and 'repeat every 5 minutes'. You would want to repeat every 1 day for many days. It might also work if you scheduled it for daily without repeats. Under the 'settings' tab I checked 'stop the task' and entered '1 minute' in the box. You might want to give it more time. I also checked the box 'if the running task does not end... force it'. In the General tab, I checked 'only run when user is logged in', because I didn't feel like logging out to test it. As I said before, there might be a problem if you intend to run the task in the background.
The bat file contains: Code:
set CALIBRE_CONFIG_DIRECTORY=...\calibre_development\config_test_device set CALIBRE_DEVELOP_FROM=...\calibre_development\calibre\src calibre-debug -g |
|
|
|
|
|
#10 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,994
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Actually, you can, it just doesn't do anything. If source is not there, it rolls over to installed exe code. I install the current exe and the source. I often rename my source directory (so the DEVELOP_FROM variable no longer points to any source), then restart calibre to see the exe version run when I want to compare how my code functions to what the exe code does.
|
|
|
|
|
|
#11 |
|
Member
![]() Posts: 24
Karma: 10
Join Date: Apr 2010
Device: iPhone, Kindle 3
|
Ok. I think the issue is that if you try and start it as a program through Task Scheduler it gets confused and doesn't close all the associated processes. If you start it using the calibre-debug -g handle from a .bat file, it just kills that .bat file which kills all the associated processess. Seems a little hacky, but works.
Thanks for your help! Hope this works for others as well. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Installer doesn't run on Windows 7 | drogo | Calibre | 5 | 02-09-2009 08:13 PM |
| Run from Source on Windows? | itimpi | Calibre | 12 | 01-22-2009 04:34 AM |
| Can eink devices run Windows Mobile? | da_jane | News | 11 | 10-14-2006 09:34 AM |