Jump to content
xisto Community
Sign in to follow this  
jedipi

[win32]how Can I Run A Comman In Background run a comman in background

Recommended Posts

there are couple of hundred PC in a domain.They are shuted down at a point of time (let say 00:00) in order to save power.I just wrote a script as follw:...shutdown -m \\192.168.3.10 -s -fshutdown -m \\192.168.3.11 -s -fshutdown -m \\192.168.3.12 -s -fshutdown -m \\192.168.3.13 -s -fshutdown -m \\192.168.3.14 -s -fshutdown -m \\192.168.3.15 -s -fshutdown -m \\192.168.3.16 -s -f...if a PC is turned on, it will be shuted down. So the script is alright. It works.But the problem is if there is a PC is shutted down already, then the shutdown comman, which is for that particular PC, will wait for the timeout signal. it is about 30 second. Therefore, it may take about 2 hours to run the script in some extreme case.In unix system, '&' can be added at the end of the comman. So the script can be finished in a short time.How can I do that in a win32 system??

Share this post


Link to post
Share on other sites

I dont know if this could help you out but give it a go anyway.You could use AT or Schtasks commands in Windows XP. Schtasks is a more powerful superset command-line scheduling tool and includes all the functionality found in the at command-line utility. Use schtasks instead of at for all command-line scheduling tasks (Windows XP Help section).For more information about schtasks or at command, open Help and Support on Start menu and search for Schtasks or AT.Hope this helpful for you.

Share this post


Link to post
Share on other sites

Dungsport, thank you for your information.

But I have no idea what Schtasks is. (need to learn more)

 

So, what I did so far is create a iplist.txt, which contain all ip address for every PC.

Then use the follwoing script to finish the task.

 

for /F %%i in (iplist.txt) do ping %%i -n 1 -w 100 |find "reply from">nul && shutdown -m \\%%i

 

Schtasks seems better choice.

I will look at the usage of Schtasks. Before that, just use the above script.

Share this post


Link to post
Share on other sites

I did a quick look on Google and found this tool. It is not command line utility (or maybe I dont know) but it supports scheduled shutdown and a lot of things. I reckon it should fulfil your requirement.

EMCO Remote ShutDown 2.0 (freeware) at http://emcosoftware.com/remote-shutdown

EMCO Remote Shutdown is a Freeware utility to Shutdown/Reboot one or many machines. Enumeration of machines with a click of a buttonMachines can be added manually or via IP-RangeSelected machines are dragged/dropped to the Machine Queue. Execution can be aborted within the waiting time limit on the remote machine.Force closing of all applications at the remote end.NT environment NT4, Win2000, WinXP.

Any much more features can be found on their website.

Cheers man,

Share this post


Link to post
Share on other sites

EMCO Remote ShutDown 2.0 (freeware) at http://emcosoftware.com/remote-shutdown

 

EMCO Remote Shutdown is a Freeware utility to Shutdown/Reboot one or many machines. Enumeration of machines with a click of a buttonMachines can be added manually or via IP-RangeSelected machines are dragged/dropped to the Machine Queue. Execution can be aborted within the waiting time limit on the remote machine.Force closing of all applications at the remote end.NT environment NT4, Win2000, WinXP.

<{POST_SNAPBACK}>


Thanks mate, this greate software is what I am looking for.

The function "a list of specific IP addresses to ignore" is good.

 

I may pay for this software.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.