Author

Topic: CGMiner ran from Task Scheduler: my own experiences and questions (Read 1120 times)

sr. member
Activity: 280
Merit: 250
Sometimes man, just sometimes.....
I use CGWatcher as well but I have never had to use an API argument. I thought by default it was set to allow all to access and you only used api-allow to filter it down to certain things if you didnt want everything to access it, but I could be wrong.  Only thing I have now that is running with CGWatcher is my Jalapeno.

Now, judging from those errors, maybe the issue can be solved with dummy plugs. Seems to not like to access the cards unless they are being used, so maybe a dummy plug would trick the system into thinking it was being used?
newbie
Activity: 8
Merit: 0
Sorry for taking longer to reply...

The api-allow argument is there only to allow me to connect cgwatcher to my running cgminer.

And I figured the problem is not loading the configuration file. I use the batch file I'm running cgminer from to save the log output to a file. This is the output I get when "Run whether user is logged on or not" is enabled in the task:



 [2013-07-23 17:44:45] Started cgminer 3.3.1
 [2013-07-23 17:44:45] Loaded configuration file cgminer.conf
 [2013-07-23 17:44:45] ADL found less devices than opencl!
 [2013-07-23 17:44:45] There is possibly more than one display attached to a GPU
 [2013-07-23 17:44:45] Use the gpu map feature to reliably map OpenCL to ADL
 [2013-07-23 17:44:45] WARNING: Number of OpenCL and ADL devices did not match!

 [2013-07-23 17:44:45] Hardware monitoring may NOT match up with devices!
 [2013-07-23 17:44:46] Probing for an alive pool
 [2013-07-23 17:44:47] Disabling extra threads due to dynamic mode.
 [2013-07-23 17:44:47] Tune dynamic intensity with --gpu-dyninterval
 [2013-07-23 17:44:47] Network diff set to 31.3M
 [2013-07-23 17:44:47] Accepted 2f54bed5 Diff 5/1 GPU 0
 [2013-07-23 17:44:47] Stratum from pool 0 requested work restart
 [2013-07-23 17:44:48] Thread 1 being disabled
 [2013-07-23 17:44:52] API running in IP access mode on port 4028 (16052)
 [2013-07-23 17:44:55] Accepted 7ede7850 Diff 2/1 GPU 0
 ...



The problem seems in fact to be that cgminer can't access some hardware/driver features that would allow for the monitoring. That is the only difference from running the task with or without that option checked.

EDIT: For comparison sake, this is the log with the "Run whether user is logged on or not" option disabled:



 [2013-07-23 17:56:27] Started cgminer 3.3.1
 [2013-07-23 17:56:27] Loaded configuration file cgminer.conf
 [2013-07-23 17:56:28] Probing for an alive pool
 [2013-07-23 17:56:29] Disabling extra threads due to dynamic mode.
 [2013-07-23 17:56:29] Tune dynamic intensity with --gpu-dyninterval
 [2013-07-23 17:56:29] Network diff set to 31.3M
 [2013-07-23 17:56:30] Thread 1 being disabled
 [2013-07-23 17:56:34] API running in IP access mode on port 4028 (16036)
 [2013-07-23 17:56:38] Pool 0 difficulty changed to 128
 [2013-07-23 17:56:38] Stratum from pool 0 requested work restart
 ...


sr. member
Activity: 280
Merit: 250
Sometimes man, just sometimes.....
The reason I asked about solo mining is your api-allow argument is for a local machine and usually I only see that if someone is solo mining. 

When it comes down to it, I dont know/think there is a way to get it to connect and load all settings if you are not logged in. When you log into an account, certain windows files are unlocked and made available depending on the user privileges (administrator, guest, etc).  And I think that is what may be causing you to not be able to get all of our settings to work.  But I could be wrong. Sorry to say, if you cannot have this system ran with no password and a single user so that it loads the desktop once turned on, I dont know if you are going to be able to accomplish what you are looking for.
newbie
Activity: 8
Merit: 0
1) No, I'm in a pool (you can see the entry in the beginning of the file, with the login information hidden)

2) What I'm trying to accomplish and if I have already done so:
  • Make the mining start whenever the computer is idle: YES
  • Make it start even if I'm not logged in: YES
  • Use auto-temp and auto-engine to avoid overheating: YES/NO, as it doesn't work when I have the "even if not logged in" option enabled in Task Scheduler

I indeed I had that duplicated entry and already removed it but it didn't make a difference.

I am targeting a batch file I created with the following contents:

Code:
cgminer.exe 2>>cgminer.log
sr. member
Activity: 280
Merit: 250
Sometimes man, just sometimes.....
Okay, a few questions. 

1)  Are you solo mining?
2)  What schedule are you actually trying to achieve here?  CGWatcher has a function that actually will let you set a mining session at specified time and run for a specified amount of hours (i.e. start at 11pm and run for 8 hours every during the work week).

I noticed in your config file that you have "gpu-engine" listed twice.  You need to delete the one that goes "gpu-engine" : "0",  This sets your gpu engine as default, but you are using auto-gpu to throttle your gpu between 700 and 1000 to reach a target temp of 80 so you might have been confusing cgminer.

One last thing, when you are running it from task scheduler, are you targeting the shortcut, or the .exe directly?
newbie
Activity: 8
Merit: 0
I am using a config file that I'll paste below. But mind that if I run CGminer with that option ticked off, it uses the same config file and works as expected.

Code:
{
"pools" : [
{
"url" : "http://stratum.bitcoin.cz:3333",
"user" : "***************",
"pass" : "*****************"
}
],
"api-allow" : "W:127.0.0.1",
"api-listen" : true,
"api-port" : "4028",
"auto-fan" : true,
"auto-gpu" : true,
"expiry" : "120",
"gpu-dyninterval" : "7",
"gpu-engine" : "0-0",
"gpu-engine" : "700-1000",
"gpu-fan" : "0-85",
"gpu-memclock" : "0",
"gpu-memdiff" : "0",
"gpu-platform" : "0",
"gpu-powertune" : "0",
"gpu-threads" : "2",
"gpu-vddc" : "0.000",
"hotplug" : "5",
"intensity" : "d",
"kernel" : "poclbm",
"kernel-path" : "/usr/local/bin",
"log" : "5",
"lookup-gap" : "0",
"no-pool-disable" : true,
"queue" : "1",
"scan-time" : "0",
"shaders" : "0",
"shares" : "0",
"temp-cutoff" : "95",
"temp-hysteresis" : "3",
"temp-overheat" : "88",
"temp-target" : "80",
"thread-concurrency" : "0",
"vectors" : "1",
"worksize" : "256"
}
sr. member
Activity: 280
Merit: 250
Sometimes man, just sometimes.....
Are you using a config file? Or all on the command line?  Post which ever one you are using.
newbie
Activity: 8
Merit: 0
Hey, thanks for the reply for this post hidden here in the newbies area! Should I even move this discussion to that other topic?

In fact I tried both of your suggestions. Running from a batch file doesn't make a difference and using cgwatcher, even though it's a great tool, either. The problem remains the same: as soon as I select "run whether user is logged or not" the auto tuning of GPU frequency and fan speed are gone and up goes temperature and noise. Undecided
sr. member
Activity: 280
Merit: 250
Sometimes man, just sometimes.....
I used to do this, and when I did I found I had to make a .bat file and told task scheduler to run that.  Running cg directly from task manager is flaky.

On a side note, what about using an app like cgwatcher?  You can use task scheduler to run that app, and it will load cgminer and all the arguments for you, as well as watch it and restart mining ever if needed.
newbie
Activity: 8
Merit: 0
Well... As I can't post directly at the topic where it makes sense (https://bitcointalksearch.org/topic/cgminer-windows-task-scheduler-help-please-115530), I'm initially posting here.

I've been trying to properly configure CGminer to start from Window 7's Task Scheduler. In my case I wanted it to run whenever my computer would become idle. Stopping was not such big of an issue, as I could manually do it.

Everything worked until I tried to make it run when my user is not logged in. It does run and works mostly as intended: mining happens properly but the one thing missing is the auto-controls over frequency and fan speeds basd on the GPU temperature. This is an important point to me as I do want to limit that temperature and also the fan noise.

I searched the forums and found no information regarding this issue. It might me my bad forum-search-fu though... So I'm looking for more info on this. Is this really a no-ca-do? Or are devs still working on this? Maybe they are even not aware? Well, just looking for whatever knowledge others have on this.

Thanks!
Jump to: