astral Posted December 31, 2011 Share Posted December 31, 2011 I want to be able to fire off an ftp process manually and have it shutdown automatically as a predetermined time. Is there any way to do this in Windows 7 I download files at night when there is no cap on my service. The cap starts at 7am and I do not want to have wake up early just to stop the ftp. So any suggestions are welcome. Best would be an ftp programme with a scheduler feature. At the moment I use Filezilla Thanks in advance. Happy New Year Link to comment Share on other sites More sharing options...
Lannig Posted December 31, 2011 Share Posted December 31, 2011 (edited) What do you want to do, specifically? If your downloads have completed before the end of your "no caps" period, what's the point of stopping the FTP client? unless it's configured to auto-refresh the remote directory contents or send NOOPs to avoid being disconnected, it won't generate traffic. Even so, it would be little traffic. If you really want to abort the transfer in progress when reaching some specific hour, I can understand what you want. In such a case, a bare-bones way would be to configure a Windows scheduled task to run: TASKKILL /F /IM <name of your FTP client program>.exe At a specific hour. You can find the actual name of your FTP client program using the Task Manager. Are you serious with the cancer-free thing? If so I'm in the same boat. Edited December 31, 2011 by Lannig Link to comment Share on other sites More sharing options...
astral Posted December 31, 2011 Author Share Posted December 31, 2011 Thanks for that pointer to Taskkill, I will give it a try. I queue files as they come up, but want to stop the ftp at 7am even if the transfers have not completed. There is always another night. I have PM'ed you on the other matter. Link to comment Share on other sites More sharing options...
Darrel Posted January 1, 2012 Share Posted January 1, 2012 FTPRush has a built-in task manager. It is a much better programme than Filezilla. Link to comment Share on other sites More sharing options...
urandom Posted January 1, 2012 Share Posted January 1, 2012 http://windows.microsoft.com/en-US/windows-vista/Schedule-a-task ? Link to comment Share on other sites More sharing options...
astral Posted January 2, 2012 Author Share Posted January 2, 2012 Taskkill is the best so far, but unfortunately killing the process it does not save the current state and outstanding ftps........ FTPRush allows a start time, but not a finish................. Still looking at Windows Schedule a Task Any other suggestions? I feel sure I had a simple way to stop and start a process but did not document it................. Link to comment Share on other sites More sharing options...
urandom Posted January 3, 2012 Share Posted January 3, 2012 (edited) edit: sorry i should have read the thread what you want is built in right in your operating system... open notepad, type this: taskkill /F /IM filezilla.exe save it as killFTPclient.bat be careful about the extension, it should not be .txt but .bat what it does: taskkill is the vista/7 way to... kill a task (you need a different command with xp) F forces to terminate the process IM specifies the name of the process you can test it now, open filezilla then run killFTPclient.bat (double-click the file), filezilla should be killed. now that it works (hopefully), we need to schedule this task: control panel > system and maintenance > administrative tools > schedule tasks then chose "create basic task" follow the wizard: name/decription trigger -> daily at 7:00 am action -> start a program, click browse and chose your script (killFTPclient.bat) finish that's it. Edited January 3, 2012 by urandom Link to comment Share on other sites More sharing options...
Darrel Posted January 3, 2012 Share Posted January 3, 2012 You could block your ftp port at certain hours in your router/firewall. Then your ftp programme will just time out gracefully. Link to comment Share on other sites More sharing options...
Lannig Posted January 3, 2012 Share Posted January 3, 2012 You could block your ftp port at certain hours in your router/firewall. Then your ftp programme will just time out gracefully. Not sure this will work. Many firewalls only enforce TCP rules on SYN packets (the ones used to establish a TCP connection) therefore there's a chance that changing the rule won't affect the already established connections. @Astral: have you tried TASKKILL without the /F? This could make a difference, giving a chance to Filezilla to catch the termination signal (or whatever it's called on Windows - I'm a Unix guy) and exit gracefully. On the other hand it might not terminate at all without the /F. Better try a simulation first. Link to comment Share on other sites More sharing options...
Darrel Posted January 3, 2012 Share Posted January 3, 2012 Many firewalls only enforce TCP rules on SYN packets (the ones used to establish a TCP connection) therefore there's a chance that changing the rule won't affect the already established connections. Worth a try though, I think. Link to comment Share on other sites More sharing options...
Lannig Posted January 3, 2012 Share Posted January 3, 2012 Many firewalls only enforce TCP rules on SYN packets (the ones used to establish a TCP connection) therefore there's a chance that changing the rule won't affect the already established connections. Worth a try though, I think. Certainly. However configuring one's router remotely from a program/script can be tricky. I would know how to do this from a Unix box using Perl or TCL/Expect but from Windows? I wouldn't how to to alter rules in Windows' firewall programatically either. At least not off the top of my head. Link to comment Share on other sites More sharing options...
Darrel Posted January 3, 2012 Share Posted January 3, 2012 Why remotely? Just log in to the router control panel and alter the settings, assuming that the router supports scheduled port blocking. If done on the PC then some third party firewall would be needed; the Windows firewall is very basic. I suspect that some of the "net nanny" type programmes could be configured to do this. Link to comment Share on other sites More sharing options...
urandom Posted January 3, 2012 Share Posted January 3, 2012 Why remotely? Just log in to the router control panel and alter the settings, assuming that the router supports scheduled port blocking. If done on the PC then some third party firewall would be needed; the Windows firewall is very basic. I suspect that some of the "net nanny" type programmes could be configured to do this. the CLI version is slightly more flexible: http://technet.microsoft.com/en-us/library/dd734783(WS.10).aspx Link to comment Share on other sites More sharing options...
Lannig Posted January 3, 2012 Share Posted January 3, 2012 Why remotely? Just log in to the router control panel and alter the settings, assuming that the router supports scheduled port blocking. If done on the PC then some third party firewall would be needed; the Windows firewall is very basic. I suspect that some of the "net nanny" type programmes could be configured to do this. the CLI version is slightly more flexible: http://technet.micro.../dd734783(WS.10).aspx Ah... netsh. The swiss knife of command-line networking in Windows. Didn't realize it could be used to control the firewall too. Thanks for the hint. Obscure syntax, though. For real nerds :-) Link to comment Share on other sites More sharing options...
Darrel Posted January 4, 2012 Share Posted January 4, 2012 There are Windows traffic-shaping programmes that could be used for this also. The pay version of Netlimiter will do it, and there are probably free tools around that will do scheduled shaping also. These will block all the network traffic on a particular programme so the ftp client should time-out gracefully. Link to comment Share on other sites More sharing options...
astral Posted January 4, 2012 Author Share Posted January 4, 2012 Thanks for all these exotic ideas I will have to try some of them Link to comment Share on other sites More sharing options...
astral Posted January 4, 2012 Author Share Posted January 4, 2012 Thank you one and all KillFTP.bat Taskkill /im Filezilla.exe Without the /F gives a graceful shutdown, thanks Lannig Then schedule a Windows basic task as Urandom suggested, for 7am A test with a schedule time a few minutes ahead seemed to work The proof will be at 7am tomorrow I did check out the other suggestions. My Router does not offer any time control My Firewall, ZoneAlarm, does offer timing facilities in the Parental Control but only a blanket control at the User level, making it too awkward for what I want Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now