How do you run BOINC at startup?

Questions and Answers : Macintosh : How do you run BOINC at startup?
Message board moderation

To post messages, you must log in.

AuthorMessage
DeMatt

Send message
Joined: 11 May 02
Posts: 7
Credit: 329,633
RAC: 0
Canada
Message 29450 - Posted: 23 Sep 2004, 18:29:05 UTC

Hello... I've been running BOINC for a while on a Windows machine, and now my family's gotten a nice shiny new G5. I've set up said G5 to have separate accounts for each user (not separate BOINC accounts, just separate preferences and the like).

My question is this: I've managed to get BOINC to run on the G5 by telling Terminal to run it. However, I want BOINC to start running when the computer is turned on, no matter who is on the computer.

Anybody know how I would do that? I've seen posts on other boards mentioning something called "crontab", but I have no idea what that is -- I'm mostly new to UNIX.
ID: 29450 · Report as offensive
haddock29

Send message
Joined: 18 Sep 99
Posts: 36
Credit: 26,012,417
RAC: 0
France
Message 30013 - Posted: 25 Sep 2004, 17:12:20 UTC

I am not the inventor, but that's works:
you will have to use the unix "crontab" command. Its main usage is to run commands at specific times. It can also run commands at boot time.
Therefore, you will have to type, in a terminal window:

crontab @reboot cd /your_boinc_directory; /usr/bin/nohup ./boinc_4.06_ppcG4-7450 >> ./boinc.res&

explanation: this is a single line, there no return after 7450. your_boinc_directory is the directory you put the boinc programm in, project directory etc. The command to run boing is only an example, its mine: I run the optimized mac_nn client, and I use to redirect the boinc outputs into a text file boinc.res, the >> meaning simply the the output is added at the end of the existing file. If you put only one ">", you you make a new file file (and erase the old one) at each launch of boinc.

You may prefer to prepare the text of the command in a text editor, and copy/paste it in a terminal window. In the case you made an error, you will have to delete the wrong cron task. This can be easily made by:

crontab -l : this command will give the list of the cron tasks, with a terrible unix identifier for each (at huge blend of numbers, dots, letters and so on)

then

crontab -r the_unix_crontab_command_identifier

You could also try to use a freeware like cronnix. It is a graphical interface to crontab.
OK ?
ID: 30013 · Report as offensive
Shiva

Send message
Joined: 14 May 99
Posts: 2
Credit: 51,951
RAC: 0
Canada
Message 30169 - Posted: 26 Sep 2004, 2:24:49 UTC - in response to Message 30013.  

> crontab @reboot cd /your_boinc_directory; /usr/bin/nohup
> ./boinc_4.06_ppcG4-7450 >> ./boinc.res&
>
> explanation: this is a single line, there no return after 7450.
> your_boinc_directory is the directory you put the boinc programm in, project
> directory etc. The command to run boing is only an example, its mine: I run
> the optimized mac_nn client, and I use to redirect the boinc outputs into a
> text file boinc.res, the >> meaning simply the the output is added at
> the end of the existing file. If you put only one ">", you you make a new
> file file (and erase the old one) at each launch of boinc.

My crontab file looks like this:
@reboot sleep 20; cd ~/boinc; ./boinc_4.05_powerpc-apple-darwin > out.txt 2> err.txt

Here, ~/boinc is the directory where boinc lives. I use a single > because I don't mind if the log gets rewritten at every reboot. One thing I did was add a sleep 20 because boinc was starting up before my hostname got set during the boot process. As a result, localhost was showing up as the name of the host when you viewed the computers in your boinc account.
ID: 30169 · Report as offensive
haddock29

Send message
Joined: 18 Sep 99
Posts: 36
Credit: 26,012,417
RAC: 0
France
Message 30335 - Posted: 26 Sep 2004, 18:13:25 UTC

By the way, the crontab @reboot is a solution to the question asked by DeMatt. I didnt had to add a wait, I didnt see any problems in my (short) computer list. The computer with the crontab @reboot is running boinc since 13 days, and have still a 0 credit despite it has crunched more than 100 Wus.

ID: 30335 · Report as offensive
DeMatt

Send message
Joined: 11 May 02
Posts: 7
Credit: 329,633
RAC: 0
Canada
Message 30958 - Posted: 28 Sep 2004, 22:13:23 UTC

Thank you all for your helpful replies. I looked around the board some more, and found a different topic with some other useful details.

Now my G5 starts up BOINC automatically, under root authority, which makes it very hard to see, let alone kill, by random users (read: my annoying little brother).
ID: 30958 · Report as offensive

Questions and Answers : Macintosh : How do you run BOINC at startup?


 
©2024 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.