Boinc and crontab |
![]() |
| log in |
Questions and Answers : Unix/Linux : Boinc and crontab
| Author | Message |
|---|---|
|
Hi guys, | |
| ID: 662247 · | |
|
Did you have this cron job working in the past? I'm not sure that would work properly. | |
| ID: 662292 · | |
I want to setup the 'run_manager' program/script as a cron job every hour As DJStarfox says, run_manager is for the GUI, and including BOINC as a service is a better, more 'system-friendly' way of handling it - but you could kick BOINC via CRON with: 01 * * * * /home/BOINC/kick.sh where kick.sh contains: ---snip--- cd /home/BOINC # start boinc if not already running if ! ps ax|grep boinc|grep -v grep > /dev/null; then exec ./boinc fi ---snip--- Save this to your BOINC directory then do: chmod +x kick.sh to make it executable BOINC itself will be crunching away without the GUI, but you can start that manually whenever you want to monitor BOINC. ____________ To err is human; to moo, bovine. | |
| ID: 662827 · | |
|
Ok, so I finally decided to forget about the crontab, and just run the client as a service. | |
| ID: 664381 · | |
Ok, so I finally decided to forget about the crontab, and just run the client as a service. Edit file /etc/rc.d/init.d/boinc Where you see the stop) function declaration, add a line that reads: rm -f /home/boinc/BOINC/lockfile ...before the line that says "./boinc_cmd --quit". Be sure to replace the directory above with the correct directory for your system. I think I found a bug in the guy's script that I linked for you. Adding that line should cause the "service stop" command to delete the lockfile. | |
| ID: 664719 · | |
Edit file /etc/rc.d/init.d/boinc I can't find the line "./boinc_cmd --quit" anywhere in the file. However according to the script, the stop) function already deletes the lockfile: ## Functions: $1 is one of start|stop|status|restart case "$1" in start) cd $BOINCDIR if [ -f lockfile ] ; then echo -n "Another instance of BOINC is running (lockfile exists)." echo_failure echo exit 4 fi if [ ! -d projects ] ; then echo -n "The BOINC client requires initialization." echo_warning echo fi echo -n "Starting BOINC client as a daemon: " su $BOINCUSER -c "$BOINCEXE $BOINCOPTS" >>$LOGFILE 2>>$ERRORLOG & sleep 1 PID=`pidof -s -x -o $$ -o $PPID -o %PPID $BOINCEXE` if [ $PID ]; then [ -d $LOCKDIR ] && touch $LOCKDIR/boinc echo_success else echo_failure fi echo ;; stop) cd $BOINCDIR if [ ! -f lockfile -a ! -f $LOCKDIR/boinc ] ; then echo -n "BOINC is not running (no lockfiles found)." echo_success else echo -n "Stopping BOINC client daemon: " killproc $BOINCEXE && echo_success || echo_failure # clean up in any case rm -f $BOINCDIR/lockfile rm -f $LOCKDIR/boinc fi echo ;; restart) $0 stop $0 start ;; This is the script that you linked to. Obviously the stop) function works in deleting the lockfile, because when I used the restart) function (like I said previously) everything works. So how can I get around this? The only solution I can think of would be to delete the lockfile on startup before the script executes. Michael Weeks | |
| ID: 665071 · | |
|
Post the contents of files: | |
| ID: 665569 · | |
|
I'm not very familiar with Fedora but I would take a look at your package manager (yum?) and see if it has a package for BOINC. If it does, it will come with all these scripts already in the right places and doing the right things. | |
| ID: 670439 · | |
I'm not very familiar with Fedora but I would take a look at your package manager (yum?) and see if it has a package for BOINC. If it does, it will come with all these scripts already in the right places and doing the right things. No such package yet. The download from BOINC website is pretty easy to install though. If I had the time and permission, I could probably just repackage their script into an .rpm file for the public. ____________ | |
| ID: 670963 · | |
Questions and Answers : Unix/Linux : Boinc and crontab
| Copyright © 2013 University of California |