How to control boinc with cron (linux?)

Message boards : Questions and problems : How to control boinc with cron (linux?)
Message board moderation

To post messages, you must log in.

AuthorMessage
Michael Campbell

Send message
Joined: 19 Jun 15
Posts: 2
United States
Message 62616 - Posted: 19 Jun 2015, 3:19:13 UTC
Last modified: 19 Jun 2015, 3:20:41 UTC

I have a script that checks my CPU temp, and adjusts the global_prefs_override.xml file's setting for CPU % accordingly, and runs "boinccmd --read_global_prefs_override"

When I run this is "me" or as the "boinc" user, it works fine. When I try to run it from cron (linux mint), I get a '1' return code, and nothing happens.

What voodoo must take place to get boinccmd to run from cron?

I've tried:
* Making sure my script cd's to the boinc user home dir (/var/lib/boinc-client)
* Making sure the script runs as the boinc user (in the boinc user's crontab)
* Setting a password in gui_rpc_auth.cfg and using "--host localhost --passwd <same as in file>"

Nothing works. This shouldn't be this hard.
ID: 62616 · Report as offensive
Michael Campbell

Send message
Joined: 19 Jun 15
Posts: 2
United States
Message 62617 - Posted: 19 Jun 2015, 14:06:10 UTC - in response to Message 62616.  
Last modified: 19 Jun 2015, 14:06:33 UTC

Well, for those watching the thread, I did a workaround.

Never did get cron to work, but I acquiesced and just ran my script in a timed loop in a tmux session, so I can kill the window and have it run in the background.

I'll have to manually do this whenever I reboot, which isn't ideal, but it gets the job done.

Something like:

while :; do 
    $HOME/bin/watch-cpu-temp | tee -a $HOME/logs/watch-cpu-temp.log
    sleep 60
done
ID: 62617 · Report as offensive
whynot

Send message
Joined: 8 May 10
Posts: 89
Ukraine
Message 62619 - Posted: 20 Jun 2015, 14:48:16 UTC - in response to Message 62617.  


Never did get cron to work, but I acquiesced and just ran my script in a timed loop in a tmux session, so I can kill the window and have it run in the background.


Surprise! Users have their private crontabs for decades. Refer to 'man crontab' for educational purpose.
I'm counting for science,
points just make me sick.
ID: 62619 · Report as offensive

Message boards : Questions and problems : How to control boinc with cron (linux?)

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.