General question re ZP & PC

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Реакции
26
Баллы
28
I'm running all projects on home PC. Is it possible to have ZP complete projects, then put PC into 'sleep' mode? Or just switch off PC?

Thanks.
 
yes.
Maybe you have to implement something like signalisation about all your projects completed. May be it would be a shared list with reports from all projects you launched with statuses. The separate project would act as a watcher of list and should be run finalization script (hibernate, sleep, poweroff)
How to implement finalization, read this.

http://stackoverflow.com/questions/6351861/how-to-initiate-standby-sleep-from-command-lineA

I think, lokiys's method is much more simple. You have only to write batch script
 
Последнее редактирование:
Right, I remember reading up on batch years ago.

I'm able to create batch for hibernation, but am stuck when monitoring threads (as Lokiys mentioned earlier) when it goes down to: 0.
 
Just put our suggestions together and you will get solution... :-)

Do like this:

Create shared list where you have to save:

Project1=Active
Project2=Active
Project3=Active

When Project1 is finished you have to delete line from this file.
Same with other projects.

With other Monitor.xmlz check every 5 min in loop if there is lines in file, If empty then hibernate.
 
The shared list is a good idea. So monitor.xmlz checks if shared list file is empty. If yes, then write hibernation string to batch file, then save?
 
this article describes many varaints of turning the maching in available states.
http://superuser.com/questions/4212...omputer-to-sleep-from-command-prompt-run-menu.

just wrote for fun the monitor batch
Код:
Развернуть Свернуть Копировать
@echo off
setlocal enableextensions
set myprocess=base.exe
:begin
for /F %%x in ('tasklist /NH /FI "IMAGENAME eq %myprocess%"') do if %%x == %myprocess% goto found
echo not running
ping -n 5 127.0.0.1 > nul
rundll32.exe powrprof.dll,SetSuspendState 0,1,0
goto end
:found
echo running
ping 127.0.0.1 -n 11 > nul
goto begin
:end
but the worst thing is that no projects are working but the base.exe instanse is still running.
 
  • Спасибо
Реакции: shabbysquire
Ok, thanks all for the info.

Will stick with a simple batch command for now.
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)