0
I trying to script the launch of cgminer based on a crontab.
Using a crontab entry that fires up a bash shell script that launches cgminer. Running the script directly launches cgminer flawlessly. Running the script from crontab always give the "no gpus usable" error.
I have triple checked that all vars are set (DISPLAY, GPU_MAX_ALLOC_PERCENT, GPU_USE_SYNC_OBJECTS=1), that the paths are correct, etc.
The entry is in the crontab accessible when being (sudo -s).
Any clues on what could be wrong ?
Again, drivers and SDK are installed correctly as everything works correctly when I launch the script manually.
The script launches cgminer with a basic cmd :
cd dir_where_cgminer_is_stored
./cgminer -c /folder/myconfig.conf
Thanks
2I guess you should be logged in and Xserver should be started before you can start cgminer. – Art Shayderov – 2014-02-28T14:07:00.310
Crontab is usually used for repeated jobs – Art Shayderov – 2014-02-28T14:08:37.523
@ArtShayderov It makes sense to launch a miner during certain times (e.g. during your sleeping break). – pyramids – 2014-02-28T19:45:40.010
Have a look at cron's documentation (manpage?) and find its logging. Chances are it has trouble talking to the X server or some other user-/permission-related issue, in which case you will likely see an error message that will point you in the right direction. To go out on a limb: Does cron launch it as a user with permissions to access /folder/myconfig.conf? Does that user have access to X using your DISPLAY environment variable? Is cron really using the environment variables you have set up for launching your shell commands? Is a shell indeed launched to execute them? ...? – pyramids – 2014-02-28T19:50:08.197
Thanks pyramids, I didn't know root cannot use another user's X session. – user2991576 – 2014-02-28T19:58:00.603