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.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Yes you can monitor project threads with bat file and when there is o threads then just kill zennoposter and shutdown pc again with bat file...
 

LexxWork

Client
Регистрация
31.10.2013
Сообщения
1 190
Благодарностей
791
Баллы
113
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
 
Последнее редактирование:

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
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.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
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.
 

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
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?
 

LexxWork

Client
Регистрация
31.10.2013
Сообщения
1 190
Благодарностей
791
Баллы
113

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Correct.

I'm not sure how that will looks like in bath file but you can shutdown PC with command "shutdown -s" with no quotes
 
  • Спасибо
Реакции: shabbysquire

LexxWork

Client
Регистрация
31.10.2013
Сообщения
1 190
Благодарностей
791
Баллы
113
this article describes many varaints of turning the maching in available states.
http://superuser.com/questions/42124/how-can-i-put-the-computer-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

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Ok, thanks all for the info.

Will stick with a simple batch command for now.
 

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