Bitcoin Forum
May 04, 2024, 04:18:11 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Late windows DOS batch file logic question...  (Read 398 times)
JaredKaragen (OP)
Legendary
*
Offline Offline

Activity: 1848
Merit: 1165


My AR-15 ID's itself as a toaster. Want breakfast?


View Profile WWW
May 17, 2016, 12:35:37 AM
 #1

So I am working on an upgrade idea for my GPU miner's batch file.

There has to be a way to check if an app is running through the terminal window and use it with logic in a batch file.

such as:

:beginfile
start ccminer.exe --options
:memoryloop
<check for ccminer.exe in memory>
  true, wait x time and goto memoryloop
  false, goto beginfile


Any ideas guys?   Probably going to have to define a variable for the true/false?

I never learned the advanced windows-connected DOS commands...

Link to my batch and script resources here.  

DO NOT TRUST YOBIT  -JK

Donations: 1Q8HjG8wMa3hgmDFbFHC9cADPLpm1xKHQM
1714839491
Hero Member
*
Offline Offline

Posts: 1714839491

View Profile Personal Message (Offline)

Ignore
1714839491
Reply with quote  #2

1714839491
Report to moderator
1714839491
Hero Member
*
Offline Offline

Posts: 1714839491

View Profile Personal Message (Offline)

Ignore
1714839491
Reply with quote  #2

1714839491
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714839491
Hero Member
*
Offline Offline

Posts: 1714839491

View Profile Personal Message (Offline)

Ignore
1714839491
Reply with quote  #2

1714839491
Report to moderator
1714839491
Hero Member
*
Offline Offline

Posts: 1714839491

View Profile Personal Message (Offline)

Ignore
1714839491
Reply with quote  #2

1714839491
Report to moderator
1714839491
Hero Member
*
Offline Offline

Posts: 1714839491

View Profile Personal Message (Offline)

Ignore
1714839491
Reply with quote  #2

1714839491
Report to moderator
JaredKaragen (OP)
Legendary
*
Offline Offline

Activity: 1848
Merit: 1165


My AR-15 ID's itself as a toaster. Want breakfast?


View Profile WWW
May 17, 2016, 01:07:07 AM
 #2

Code:
:wait1
set EXE=ccminer.exe
FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% goto FOUND
goto FIN1
:FOUND
echo %EXE% still running.
goto wait1
:FIN1
:wait2
set EXE=ccminer_.exe
FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% goto FOUND
goto FIN2
:FOUND
echo %EXE% still running.
goto wait2
:FIN2
:wait3
set EXE=ccminer50.exe
FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% goto FOUND
goto FIN3
:FOUND
echo %EXE% still running.
goto wait3
:FIN3
:wait4
set EXE=ccminer-DCD.exe
FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% goto FOUND
goto FIN4
:FOUND
echo %EXE% still running.
goto wait4
:FIN4
:wait5
set EXE=ccminerB2S64.exe
FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% goto FOUND
goto FIN5
:FOUND
echo %EXE% still running.
goto wait5
:FIN5
goto start

Link to my batch and script resources here.  

DO NOT TRUST YOBIT  -JK

Donations: 1Q8HjG8wMa3hgmDFbFHC9cADPLpm1xKHQM
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!