Bitcoin Forum
May 05, 2024, 04:46:43 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Auto re-starting miner every 10 minutes!  (Read 2483 times)
Sebz4n (OP)
Member
**
Offline Offline

Activity: 77
Merit: 10


View Profile
June 16, 2011, 10:39:21 AM
 #1

Hey guys!

I keep getting this "Verification Fail, Check Hardware" error quite often, so my GPUs waste a lot of precious mining time Sad This failure is often solved for a while by restarting GUIMiner, so I made a batch that does just that!

So now my GUIMiner restarts itself every 5 minutes, with a pause on 5 seconds (5 seconds cool-off time every 10 minutes), and it does so minimized, but I have a question:

How do I make the cmd window disappear? I can run it stealth via a vbs script:

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "G:\Users\Sebz4n_GAME_OS2\Desktop\Restart GUIMiner.bat" & Chr(34), 0

But a window still opens and appears for 0.2 seconds or so, which I wanna remove, how do I do that?

Thank you
1714884403
Hero Member
*
Offline Offline

Posts: 1714884403

View Profile Personal Message (Offline)

Ignore
1714884403
Reply with quote  #2

1714884403
Report to moderator
1714884403
Hero Member
*
Offline Offline

Posts: 1714884403

View Profile Personal Message (Offline)

Ignore
1714884403
Reply with quote  #2

1714884403
Report to moderator
1714884403
Hero Member
*
Offline Offline

Posts: 1714884403

View Profile Personal Message (Offline)

Ignore
1714884403
Reply with quote  #2

1714884403
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714884403
Hero Member
*
Offline Offline

Posts: 1714884403

View Profile Personal Message (Offline)

Ignore
1714884403
Reply with quote  #2

1714884403
Report to moderator
Freakin
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
June 16, 2011, 04:13:23 PM
 #2

you can use AT to run a script hidden and schedulded
Sebz4n (OP)
Member
**
Offline Offline

Activity: 77
Merit: 10


View Profile
June 17, 2011, 10:15:27 AM
 #3

you can use AT to run a script hidden and schedulded

AT?
Jack of Diamonds
Sr. Member
****
Offline Offline

Activity: 252
Merit: 251



View Profile
June 17, 2011, 10:22:55 AM
 #4

you can use AT to run a script hidden and schedulded

AT?

http://www.computerhope.com/unix/uat.htm

1f3gHNoBodYw1LLs3ndY0UanYB1tC0lnsBec4USeYoU9AREaCH34PBeGgAR67fx
Sebz4n (OP)
Member
**
Offline Offline

Activity: 77
Merit: 10


View Profile
June 17, 2011, 12:37:08 PM
 #5

I have more or less gotten this to work, using these two things:

.vbs script that runs the batch silently:
Code:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "G:\Users\Sebz4n_GAME_OS2\Desktop\Restart GUIMiner.bat" & Chr(34), 0
Set WshShell = Nothing

.bat file that is run silently by the .vbs script:
Code:
start TASKKILL /F /IM "guiminer.exe"
start TASKKILL /F /IM "poclbm.exe"
PING 1.1.1.1 -n 1 -w 1000 > NUL
start /d "G:\Users\Sebz4n_GAME_OS2\Desktop\GUIMiner\" miner.lnk

Now, the problem I have left, is that the taskkiller commands gives some kind of "feedback" in a new dos window, it pops up so fast, that I can't read what it says, but it's something regarding the program PID's not being found (it does work as inteded however)!

I've tried to make the taskkillers output the "feedback" into a log file like this, but it doesn't work (It does make an empty log file), so I suspect it's because they open a new dos:
Code:
start TASKKILL /F /IM "guiminer.exe" > testlog1.txt
start TASKKILL /F /IM "poclbm.exe" > testlog1.txt
PING 1.1.1.1 -n 1 -w 1000 > NUL
start /d "G:\Users\Sebz4n_GAME_OS2\Desktop\GUIMiner\" miner.lnk

Can you force them to write in the current dos? Or is there another way?
I don't understand the AT script's I'm afraid, so this seems easier
Freakin
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
June 17, 2011, 07:14:45 PM
 #6

AT for windows
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/at.mspx?mfr=true
Sebz4n (OP)
Member
**
Offline Offline

Activity: 77
Merit: 10


View Profile
June 17, 2011, 07:56:09 PM
 #7

The issue is that the taskkiller command returns some kind of feedback in a new dos window, saying something like "The PID was not found" - I need to disable or hide this feedback, not use AT script.
Freakin
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
June 17, 2011, 08:20:07 PM
 #8

ditch the batch & vbs to kick it off and do the whole thing in autohotkey

very easy to use and run commands hidden, and has built in timers, etc.

the Process command takes care of killing the task

http://www.autohotkey.com/docs/commands/Process.htm

autohotkey really is an incredibly functional scripting language

not tested, but this should basically work.  timer is in milliseconds. 
if you have a problem running the shortcut file directly just link directly to the exe.  Also i made it sleep for 1 second after closing processes.  You could also use "WaitClose" instead of "Close" to make it wait for the applicaiton to close before proceeding
Code:
#Persistent
SetTimer, RestartMiner, 600000
Return

RestartMiner:
Process, Close, poclbm.exe
Process, Close, guiminer.exe
Sleep, 1000
Run Powershell.exe G:\Users\Sebz4n_GAME_OS2\Desktop\GUIMiner\miner.lnk
Return
Sebz4n (OP)
Member
**
Offline Offline

Activity: 77
Merit: 10


View Profile
June 17, 2011, 08:38:22 PM
 #9

Doesn't work, powershell.exe opens like every second (in a dos window, so that won't help) Sad
Tried setting all timer listed to 99999999 but no difference, also edited to WaitClose but that didn't work either
Freakin
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
June 17, 2011, 08:58:40 PM
 #10

haha whoops take out the powershell.exe part.  you dont' need that.  that was muscle memory kicking in before I copy/pasted your shortcut link

i just tested this with my batch file that runs cmdlink phoenix miner and it worked great w/ 30 second timer

Here's exactly what I used for my test

Code:
#Persistent
SetTimer, RestartMiner, 30000
Return

RestartMiner:
Process, Close, phoenix.exe
Sleep, 1000
Run C:\bitcoin\phoenix-1.48\Namecoin_bitparking.bat, c:\bitcoin\phoenix-1.48,
Return
Sebz4n (OP)
Member
**
Offline Offline

Activity: 77
Merit: 10


View Profile
June 18, 2011, 03:30:18 PM
 #11

Doesn't close process, also still opens a dos window Sad
Freakin
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
June 18, 2011, 07:06:44 PM
 #12

you did change the process name from my example, right?  I don't use guiminer or poclbm, and i use a batch file to start my mining.

for you, add in your other "process, close" like in the first example, then change the run command to your shortcut

if it still pops up a window from running your link then at the end of the line after the 2nd command, put in "hide"

like

Run G:\Users\Sebz4n_GAME_OS2\Desktop\GUIMiner\miner.lnk,, Hide

phelix
Legendary
*
Offline Offline

Activity: 1708
Merit: 1019



View Profile
June 20, 2011, 11:07:03 AM
 #13

Hey guys!

I keep getting this "Verification Fail, Check Hardware" error quite often, so my GPUs waste a lot of precious mining time Sad This failure is often solved for a while by restarting GUIMiner, so I made a batch that does just that!


probably your cards run too high. by restarting you give them a little time to cool.

restarting periodically is a really bad idea imho. try better cooling / spacers / lower mem clock / lower core clock ...
Sebz4n (OP)
Member
**
Offline Offline

Activity: 77
Merit: 10


View Profile
June 20, 2011, 01:03:25 PM
 #14

Hey guys!

I keep getting this "Verification Fail, Check Hardware" error quite often, so my GPUs waste a lot of precious mining time Sad This failure is often solved for a while by restarting GUIMiner, so I made a batch that does just that!


probably your cards run too high. by restarting you give them a little time to cool.

restarting periodically is a really bad idea imho. try better cooling / spacers / lower mem clock / lower core clock ...

Not gonna invest in better cooling, when the major problem is that my two cards are too close (secondary is blocking the primary's fan). Can't spread them, as the secondary will be blocked by the PSU Sad

Mem clocks are both a 300, and even with default clocks I get this error
phelix
Legendary
*
Offline Offline

Activity: 1708
Merit: 1019



View Profile
June 20, 2011, 06:41:46 PM
 #15

what temps? if below 80 something is definitely wrong
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!