Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

batch file to keep website running


  • Please log in to reply
4 replies to this topic

#1 borvishal

borvishal

  • Members
  • 29 posts
  • OFFLINE
  •  
  • Local time:03:59 PM

Posted 01 June 2015 - 09:51 PM

Hi All,

 

My boss wants to have access to a specific website all the time during business hrs. His condition is that once he starts his laptop and open the website; it should not disconnect from server (due to inactivity) even if he is not active on that screen. This website gives live data of the work that we do and he wants to keep checking it all the time and do not have to start the site every time as he don't know when he will take a look at it during entire day.

 

I have 2 issues here:

1. Laptop should remain active for the whole day once he starts in the morning (since it locks after certain mins of inactivity)

2. Given website should be active even if he doesn't access it all the time.

 

One potential solution to the first problem that I could find was to change Screensaver settings on the laptop. I am not sure whether it will resolve first problem as I haven't tried ( I plan to do so as soon as I get admin access on the laptop which will take 3 more days). I do not have solution to the second issue as I have not written any batch file code ever so I dont know where to write and how to keep it running. May be run as soon as machine starts?

 

Apologies if this is a stupid question/problem but for me this is big issue. Request you all to please look into the same and provide resolution. 

 

And yes, its a windows 8 machine connected to office network so I cannot download any specific software to run and get my work done. 



BC AdBot (Login to Remove)

 


#2 technonymous

technonymous

  • Members
  • 2,520 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:12:59 PM

Posted 03 June 2015 - 04:52 PM

Laptop needs to be plugged into its wall wart so the battery doesn't die. Then adjust the power profile to "High performance." It's under Control panel, System and Security, Power options. Next go to run and type devmgmt.msc hit enter. Go to network adapters, adapter, right-click properties, power management tab, uncheck "Allow this computer to turn off this device to save power." That should fix the the laptop from going to sleep.

 

As far as the website maybe you can elaberate more on that. For the keepalive session you might be able to use a keepalive addon for like Firefox. However, that may not work to keep serverside sessions from timing out for things like ssh tunneling or bash, or cpanel. Those are controlled by server configs. The router drops those inactive sessions out of it's tables if it gets no reply. Using ssh as an example.... you can adjust the ServerAliveInterval setting in either the clients /etc/ssh_config directory. Or for the servers side the ClientAliveInterval sshd_config located in in each users home directory on the server, or the servers global sshd_config in /etc/ssh/sshd_config. Hope that helps point you in the right direction.

 

Edit: The ServerAliveInterval 60 & ClientAliveInterval 60 would represent 60 seconds. So every 60 seconds a null packet would be sent out to keep the session alive regardless of client bash input etc. Also using a ssh client like putty you have to adjust it's keepalive settings as well. Firefox also has a setting by typing about:config in the url field and search for network.http.keep-alive.timeout default is 115seconds. Maybe adjusting that to 60 might help. Not sure what timeout is on your router. So if a router is set to 60 and Firefox is set to 115 then the router will clear it's tables before firefox sends out a null keepalive packet. So try that.


Edited by technonymous, 03 June 2015 - 05:20 PM.


#3 borvishal

borvishal
  • Topic Starter

  • Members
  • 29 posts
  • OFFLINE
  •  
  • Local time:03:59 PM

Posted 03 June 2015 - 10:36 PM

Thank you technonymus for your suggestions. I will try these options however upon further research I figured out that one can create a batch file/vms file and achieve desired effect. Do you know/have information about such code? Not sure if this is the right place to ask this Q or not.

 

On the website front, site name is Qlikview which is used to fetch large data in presentable manner which is configurable to your needs. There are cerain reports that my boss wants to keep an eye on. So this site; if not active for some 30 mins goes into inactive mode and when you click on any of the link you get a message that 'Reconnecting to Server' so this is certainly Server side timeout issue. My boss dont want to see that message even though he checks that site after 4-5 hrs



#4 technonymous

technonymous

  • Members
  • 2,520 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:12:59 PM

Posted 04 June 2015 - 10:37 PM

This server side software is configured to kill the session at 30 minutes or set to kill the session after 30 minutes of inactivity. I am not sure that this software would have a conifg to change that parameter. It may be just hard coded into the software, and that would be unfortunate. I can relate to your bosses aggravation. Most batch files that I read up on just mention ping echo request. I doubt that would keep the session alive. Those are two different things. Typically a software like this is expecting a keepalive packet directed to it at intervals on a specific port it functions on. I would ask Qlikview support for a solution. As I said before about addons. The browser session is expecting input from the user. There is a Firefox browser addon that interacts with the browser in ways to keep the session alive like refreshing the tab etc. You can set it at whatever minutes you want. https://addons.mozilla.org/en-us/firefox/addon/reloadevery/  However, as I  mentioned before the server may just kill the session at 30 minutes no matter what.


Edited by technonymous, 04 June 2015 - 10:38 PM.


#5 technonymous

technonymous

  • Members
  • 2,520 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:12:59 PM

Posted 28 June 2015 - 04:03 PM

Something to look into is powershell. It's a lot more robust. http://www.dnnsoftware.com/community-blog/cid/155007/creating-a-local-keep-alive-service-on-your-web-server






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users