Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Community > Team MacNN > crontab for BOINC

crontab for BOINC
Thread Tools
ditchhook
Fresh-Faced Recruit
Join Date: Sep 2004
Status: Offline
Reply With Quote
Sep 14, 2004, 05:47 PM
 
Hi all

at

http://forums.macnn.com/showthread.p...on#post2122191

A short crontab program is described. Adapted to my choice of names, it contains one line:

@reboot cd /Applications/boinc; /usr/bin/nohup ./boinc &

When I install and run ("crontab boinctab") this file, I get

"boinctab":2: bad day-of-month
crontab: errors in crontab file, can't install

Can anyone help out?
     
mikkyo
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
Sep 14, 2004, 08:14 PM
 
This is on MacOSX correct?
The @reboot isn't supported on other machines.
Your file should look like this, with a newline at the end.

-------boinctab-------
@reboot cd /Applications/boinc; /usr/bin/nohup ./boinc &

________________
     
Welnic
Forum Regular
Join Date: Nov 2002
Location: Santa Barbara CA
Status: Offline
Reply With Quote
Sep 14, 2004, 09:06 PM
 
I like to add something so that you can see what is going on:

@reboot cd /Applications/boinc; /usr/bin/nohup ./boinc > output.log &

This puts the output that you would see in the terminal if you were running without the & in the output.log file. The best way to look at that file is to use the console application. If you double click on the file since it has the .log it will open the console. If you do not close the window in console, you just quit instead, then the next time you open console it will open output.log again also.

If you use >> instead of >, then it will add the output on to the old file. Just using one starts it over with a new file every time, which keeps it from growing. If you are having problems then >> would be the way to go as it keeps the old output.
     
ditchhook  (op)
Fresh-Faced Recruit
Join Date: Sep 2004
Status: Offline
Reply With Quote
Sep 15, 2004, 10:05 AM
 
My crontab seems to be working now. Apparently all I needed was a blank line at the end of the file!

Someone might do well to compile all these hints to get BOINC going on OS-X into one webpage.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Sep 15, 2004, 11:58 AM
 
Originally posted by mikkyo:
This is on MacOSX correct?
The @reboot isn't supported on other machines.
...
@reboot is supported on other operating systems. I checked a debian box just to be sure, @reboot is in the man page (crontab5)

You're probably thinking of the @AppleNotOnBattery tag, which is used to schedule executions on laptops only if they are plugged in.
     
mikkyo
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
Sep 15, 2004, 04:15 PM
 
Last time I looked none of the standard cron installs supported @reboot on anything other than OS X. Good to see some of the nixes are finally catching up.
     
ditchhook  (op)
Fresh-Faced Recruit
Join Date: Sep 2004
Status: Offline
Reply With Quote
Sep 17, 2004, 04:39 PM
 
Hi

I just got into CERN's BOINC related project.

But I don't know how to turn off the crontab boinctab to allow me to attach to the new project.

Also, I didn't see "Team MacNN" on their list. Do you wish for me to create one?
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Sep 17, 2004, 05:32 PM
 
I'll create one tonight. But I'd heard that project does not have a Mac worker just yet, and is in closed beta.
     
ditchhook  (op)
Fresh-Faced Recruit
Join Date: Sep 2004
Status: Offline
Reply With Quote
Sep 17, 2004, 05:41 PM
 
I poked around their bulletin boards and discovered they apparently are giving a MAC version of their specific software a very low priority.

I gave one of my MACs the login, but the project rejected the request to download the work.

I have one of my PC machines working for them at the moment. And plan to add them to my home machine in a moment. It might be fun to create a MAC team for a project that doesn't support MACs!

Anyway, I'll still need to know how to cancel a crontab process for when Predictor comes back on line.
     
Shaktai
Mac Elite
Join Date: Jan 2002
Location: Mile High City
Status: Offline
Reply With Quote
Sep 17, 2004, 05:42 PM
 
Originally posted by reader50:
I'll create one tonight. But I'd heard that project does not have a Mac worker just yet, and is in closed beta.
They just opened up the closed beta to an additional 1000 participants. Project is scheduled to go public, September 29th. You are correct, there is no Mac worker yet. I believe they just recently added a Linux worker, so hopefully a Mac worker will be available soon.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Sep 17, 2004, 08:47 PM
 
Originally posted by ditchhook:
...
Anyway, I'll still need to know how to cancel a crontab process for when Predictor comes back on line.
Open a Terminal.

crontab -e (Return)

You are viewing your crontab in a CLI text editor. Move around as desired with the arrow keys. If you want to delete something, move over the beginning of it and press the x key.

If you want to add text, or delete in a more normal way, press i to enter insert mode. When you are finished inserting, press Esc to escape back to command mode.

When you are done editing (and are back in command mode) press:

:wq (Return)

You're done, the edited crontab has been saved. As for that final command:

: = enter special commands.
w = write changes to disk.
q = quit the text editor.

If you make a mistake and want to change your mind, type:

:q (Return)

... to exit the editor without saving any changes.
     
ditchhook  (op)
Fresh-Faced Recruit
Join Date: Sep 2004
Status: Offline
Reply With Quote
Sep 18, 2004, 05:39 PM
 
Right now I have a crontab set up (as instructed here) to run BOINC at reboot. If I open a terminal window and type "./boinc -attach_project" I am told it is already running (because of my crontab). I wish to stop boinc, then attach to predictor when they are back up, but I don't know how unless I shut down the crontab instructions I installed (called boinctab). I don't wish to modify my boinctab, I simply wish to temporarily shut it down or somehow get access to BOINC again to add a new project.

Are you saying the only way to do this is to "erase" the contents of the boinctab and reboot?
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Sep 18, 2004, 05:47 PM
 
You can issue a kill command to BOINC, but not having run BOINC yet, I don't know if that causes problems or not.

I'll let one of our BOINC experts answer that one. If you want to try anyway, fire up Terminal and type:

top (Return)

You will get a list of running processes. Note the PID of the BOINC process - the PID (Process ID number) is usually the leftmost column. Then stop top by typing:

q or Q (no Return)

and type:

kill xxx (Return)

... where xxx is the PID number that you found for BOINC. Doing this is much the same as giving BOINC a Control-C interrupt. If BOINC will not quit this way, you can give it a force-quit by typing:

kill -9 xxx (Return)

Don't use this version if you don't have to. It doesn't give BOINC a chance to shut down, instead BOINC is removed from the CPU schedule and it's RAM is freed up.
     
Welnic
Forum Regular
Join Date: Nov 2002
Location: Santa Barbara CA
Status: Offline
Reply With Quote
Sep 18, 2004, 07:23 PM
 
It works fine to kill the boinc process. You do not want to kill the hadsm3se process, which is the one that actually does all of the work, as data would be lost and the boinc process would probably start it up again anyway. This is from my output.log file the last time I killed boinc.

1yiv_100112330 - PH 1 TS 039248 - 08/03/1813 16:00 - H:M:S=0120:01:42 AVG=11.01 DLT=44.07
1w99_100109364 - PH 1 TS 041172 - 18/04/1813 18:00 - H:M:S=0127:48:19 AVG=11.18 DLT= 4.52
1w99_100109364 - PH 1 TS 041173 - 18/04/1813 18:30 - H:M:S=0127:48:23 AVG=11.17 DLT= 4.61
2004-09-14 16:48:38 [---] Received signal 15
2004-09-14 16:48:39 [---] Exit requested by user
CPDN Monitor got quit request...
Detaching shared memory...
1yiv_100112330 - PH 1 TS 039249 - 08/03/1813 16:30 - H:M:S=0120:01:47 AVG=11.01 DLT= 4.69
CPDN Monitor got quit request...
Detaching shared memory...

Signal 15 is the default value for kill. After you kill it and then run the attach project it will keep running in the terminal doing work. If you then stop it with Control-C or Command-., you can then start it up with the same line that you use in cron and it will run in the background and you can quit terminal.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Sep 19, 2004, 12:39 AM
 
Originally posted by ditchhook:
...
I just got into CERN's BOINC related project.
...
Also, I didn't see "Team MacNN" on their list. Do you wish for me to create one?


Originally posted by reader50:
I'll create one tonight.
...
You need a user account to create a team, and they have disabled new user accounts until they expand the user base again.

Please don't found us one if you have an account, we try to end up with all the different team access stuff available to the team leaders. A team founder can access user emails on this project, as well as kick members, and disband the team.

The team access pass is typically the same as the pass on the founder's personal account. I'll keep checking it regularly for the next opportunity to get in, and start us a Team MacNN. Hopefully, that will happen at the same time as a Mac client announcement.
     
mikkyo
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
Sep 19, 2004, 03:44 AM
 
To easily kill your boinc app at any time try
killall -m boinc*

Don't make any typos though, -m means match, the * after boinc is the wildcard, and means 'and anything else'. So in effect you are saying 'kill anything that starts with boinc'.
This is easier than typing
killall boinc_4.06_powerpc_apple_darwin

     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 09:05 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,