Had a request at work to delay execution of a command creating multiple connections from clients to a server, in order to upload a file. Potentially with the scheduled task in place there would be approximately 2000 connections at one time (all the clients had a fixed schedule at 7.00 am).
This was deemed as a bad idea. So the following code was born from a bit of googling
REM Initial batch code placed here
REM start of random delay code
@ECHO OFF
CLS
echo %random% > nul
set /a noofseconds=(%random%/1000)+1
echo Wait %noofseconds% seconds
ping 127.0.0.1 -n %noofseconds% -w 1000 > nul
REM batch code for to do something after delay
_______________________________________________________________
the above line set /a noofseconds=(%random%/1000)+1 potentially gives a random delay of 1 to 32 seconds, to increase it change the division to /100 i.e. set /a noofseconds=(%random%/100)+1) ,this will produce a delay 1 to 328 seconds.
Changing to /10 1 to 3277 seconds.
Hope this helps me as many others who post on the web helped me. ping 127.0.0.1 -n %noofseconds% -w 1000 > nul is well referenced on the net to.
My thoughts
Tuesday, 19 March 2013
Wednesday, 18 August 2010
My new Blackberry Storm 2
Hi, I've just replaced my old Blackberry Storm with a Blackberry Storm 2 9520. First thoughts not to bad, not sure of the feel of the screen also a little sluggish, and the signal dropping out.
Came across my first problem though, tried updating firmware to latest release to find that it wouldn't go on!!!! After investigation (don't you just love the web) I see that the UK vodaphone models have DRM enabled firmware. Thus only allowing you to upgrade with DRM enabled flashes, o eck cannot debrand the fone.
Well I updated to the latest vodaphone release (spanish version) and it's operating a lot better.
Thursday, 9 April 2009
Alfresco
With the advent of credit crunch, and the potential sale of the business I'm working for we have started going down the road of open source.
My first project was a chat server (for which I used openfire), this is now up and running and has been approved after proof of concept to be rolled out to selected individuals within the business.
Second project was a micro blogging site, for this I used laconica, although in it's infancy is a very good product.
My only bug bear about open source the is the documentation.
My current project is to find a sharepoint alternative, I'm currently looking to implement alfresco.
My first project was a chat server (for which I used openfire), this is now up and running and has been approved after proof of concept to be rolled out to selected individuals within the business.
Second project was a micro blogging site, for this I used laconica, although in it's infancy is a very good product.
My only bug bear about open source the is the documentation.
My current project is to find a sharepoint alternative, I'm currently looking to implement alfresco.
Md Blackberry storm
Just setup his trial bb storm (9500) upgraded to version 114 leaked OS, hmm see how it goes. Have to say it's a brilliant device (I've had one for about 3 months now) canny wait till version 2 out in the autumn.
Subscribe to:
Posts (Atom)