REQ: run program when all tasks are finished

Post Reply
Josef K
Posts: 534
Joined: Thu Feb 27, 2003 7:29 pm

REQ: run program when all tasks are finished

Post by Josef K »

I've hit an issue that's presented itself lately. There used to be a time when I'd let my computer(s) run all day and night forever but for several reasons I now put them to sleep. I know there have been one or two mentions of this in the past but there weren't any real solutions. My request would have been for UE to have an option to make the computer sleep once all tasks (download/repair/unpack) have finished. Of course, there is the option to finish and shutdown Windows.

However, on my computer this does not work. For some reason I have not yet determined, the shutdown refuses to happen. This was the case with Vista and now Win7, both from clean installs. Both are x64 so maybe UE needs a different method to perform a shutdown procedure within an x64 environment. Maybe it's because of admin rights. Either way, it doesn't work.

The next attempt was to set the computer to sleep after a set period. It slept alright but UE was far from finished. I tried this on a couple of different occasions and the computer went to sleep well before UE had finished. Again for reasons unknown - UE was very busy when sleep kicked in.

Now I wonder if the most elegant solution would be to have somewhere to put in the path and parameters to a program of my choosing which could perform any other tasks once UE had finished. For example, I could specify a defragmenter with parameters to tidy up the disk if I'd downloaded a lot. Or, I could create a script or batch file and have it run that. I could even set my antivirus to deep scan everything I'd downloaded so I would know everything had been checked when I next use the computer. Mainly, though, I'd be able to have UE finish all tasks, call 'psshutdown.exe -d' with a timer to allow UE to exit and then know that the computer would be put to sleep properly.

I'd like either for UE to put the computer to sleep after finishing all tasks or the option to run a program when finished.

P.S. This isn't a request based on power usage. I could leave all my computers running all the time but I have other needs for the computer to sleep.
spicer
Posts: 8
Joined: Mon Mar 17, 2008 7:48 pm

Re: REQ: run program when all tasks are finished

Post by spicer »

Hi joseph,
you might want to use this command to put your machine to sleep:

Code: Select all

rundll32 powrprof.dll,SetSuspendState
I hope Alex implements the 'run batch after all tasks succeeded' soon.
We might even start a thread exchanging cool commands in ..I dunno... the gossip topic maybe? :wink:
Also; take a look at this
Post Reply