Keyboard Shortcuts
Likes
Search
Restart TWS without IBC to keep session
Hi,
?
First of all, thank you very much for your work, Richard. And my question: is there any way to restart programmatically TWS tidy without closing IBC (like a daily restart) to keep the same session during the week (I need this if something wrong happened for example API couldn't connect due to socket error and etc.) Stop.bat close IBC as a result new session and 2x factor authentification.
?
Regards,
Alexander |
As it happens, TWS has a File | Restart... menu item which does exactly what you want. It works with IBC exactly as you'd expect, just like an auto-restart - in fact IBC can't tell the difference between the two. It would be possible to provide a RESTART command, similar to the STOP command, but are you able to just use the menus manually?? Note that this restart menu item isn't available for Gateway, but maybe IB will provide it in a future version.? Richard? From: [email protected] <[email protected]> on behalf of Riks <atsdev@...> Sent: Saturday, 17 December 2022, 13:48 To: [email protected] <[email protected]> Subject: [ibc] Restart TWS without IBC to keep session Hi,
?
First of all, thank you very much for your work, Richard. And my question: is there any way to restart programmatically TWS tidy without closing IBC (like a daily restart) to keep the same session during the week (I need this if something wrong happened for example API couldn't connect due to socket error and etc.) Stop.bat close IBC as a result new session and 2x factor authentification.
?
Regards,
Alexander
|
开云体育Ok, noted. ? From: [email protected] <[email protected]> On Behalf Of Riks
Sent: 17 December 2022 18:25 To: [email protected] Subject: Re: [ibc] Restart TWS without IBC to keep session ? Thanks, but really it would be great to have RESTART command, similar to the STOP for full automation of the process. ? Regards, Alexander |
开云体育When I wrote: ? ‘Note that this restart menu item isn't available for Gateway, but maybe IB will provide it in a future version.’ ? what did you think I meant? ? I will do this command when I get some time to do it. Strange to say, I do actually have a life outside of working on IBC… ? ? ? From: [email protected] <[email protected]> On Behalf Of t1user
Sent: 20 December 2022 09:15 To: [email protected] Subject: Re: [ibc] Restart TWS without IBC to keep session ? +1 on the restart request The whole point of using IBC is to make the setup run fully automatically, manually restarting tws/gateway is not an option @Richard: I presume what you said about TWS is also true about Gateway, correct? |
开云体育That’s correct. ? Having said that, it occurs to me that until IB provide the Restart menu entry in Gateway, it would be possible for IBC’s proposed RESTART command to force a Gateway restart by explicitly changing the Auto-restart time to something in the near future: Gateway would then do a normal restart when that time arrived, and IBC would do the necessary. Because doing this would persist that new auto-restart time in the Gateway settings, It would be necessary for config.ini to contain the AutoRestartTime setting to reconfigure it back to the desired ‘normal’ time. ? I don’t know how close to current time you can set the Auto-restart time such that Gateway will act on it, but I can find out via experimentation. But it may be necessary to incur a delay of say 30 seconds when using this approach. ? Regarding life, Marvin the paranoid android would agree with you, but I’m not sure working on IBC would have alleviated the pain in all the diodes down his left side… ? ? ? From: [email protected] <[email protected]> On Behalf Of t1user
Sent: 20 December 2022 10:47 To: [email protected] Subject: Re: [ibc] Restart TWS without IBC to keep session ? Sorry, missed this part, my bad, will read more carefully in the future. So, basically at the moment there is no way to restart Gateway without triggering 2FA (apart from automatic daily restarts)? This life thing is overrated. There's no reason to prioritise it over work on IBC. |
toggle quoted message
Show quoted text
On 20 Dec 2022, at 12:26, Richard L King <rlking@...> wrote:
|
开云体育Shrivelled walnut, more like. And decreasing with every passing day… ? I have actually just done the code for this, need to test – but lunch first! Maybe issue a beta version later today (probably won’t be tested on Linux because everything here runs on Windows during the day, but in practise this sort of thing tends to work equally well on both with no trouble). ? ? ? From: [email protected] <[email protected]> On Behalf Of Mark Murari
Sent: 20 December 2022 11:40 To: [email protected] Subject: Re: [ibc] Restart TWS without IBC to keep session ? That’s very clever, perhaps you do have the brain the size of a planet Richard.?
|
开云体育I didn’t manage to get as far as I hoped yesterday – it was all working fine for TWS, but not yet for Gateway. ? As I’m not sure when I’ll be able to finish the Gateway work, I decided to issue a beta version so that TWS users can test the new RESTART command (if you try it on Gateway, the command will be accepted but nothing happens, it just keeps running). ? So this is IBC 3.16.0-beta.1: ? ? You’ll need to extract the IBC.jars and version files, overwriting your existing ones. ? If you’re running on Windows, you’ll also need to extract the new SendCommand.bat script, and the SendIBCCommand.vbs file from the /Scripts subfolder. You’ll probably need to Unblock all these files. You’ll need to read the comments in SendCommand.bat and make any necessary changes. SendIBCCommand.vbs should not be altered. When you run this script, you must supply the relevant command as the first argument, for example: ? SendCommand RESTART ? or ? SendCommand STOP ? On Linux, run the telnet session in the usual way and use the command RESTART (I can never remember how to script telnet on Linux, and I don’t want to waste time looking it up now, but I’m sure you lot know what to do). ? ? ? From: [email protected] <[email protected]> On Behalf Of Richard L King
Sent: 20 December 2022 13:17 To: [email protected] Subject: Re: [ibc] Restart TWS without IBC to keep session ? Shrivelled walnut, more like. And decreasing with every passing day… ? I have actually just done the code for this, need to test – but lunch first! Maybe issue a beta version later today (probably won’t be tested on Linux because everything here runs on Windows during the day, but in practise this sort of thing tends to work equally well on both with no trouble). ? |