1)
Questions and Answers :
Unix/Linux :
Crontab Question
(Message 7519)
Posted 14 Jul 2004 by ![]() Post: If I understand the crontab format correctly, the line below will try to run 'my_boinc_app' once a minute, every minute, all day long!! > Ok, thanks a lot for your help. > Just to make sure the crontab line would be something like this?: > > * * * * * cd/my_boinc_dir; ./my_boinc_app > /dev/null 2> /dev/null This line is a little better behaved: 0,15,30,45 * * * * cd /my_boinc_dir/; if ps -aux | grep -v grep | grep "boinc"; then exit; else ./my_boinc_app > /dev/null 2> /dev/null; fi It will check every 15 minutes to see if there is an active process with the string 'boinc' in it's name. If there is none, it will start 'my_boinc_app". (you may be able to simplify the begining part from '0,15,30,45' to '*/15') |
2)
Questions and Answers :
Macintosh :
Running BOINC at startup
(Message 7457)
Posted 14 Jul 2004 by ![]() Post: I will add one small correction to Colin's crontab solution. > 5 * * * * cd /sw/boinc/; if ps -aux | grep -v grep | grep "boinc"; then exit; > else ./boinc_3.18_powerpc-apple-darwin; fi ... > You're done! From now on, whenever you're logged in, the program you copied > into TextEdit above will run every five minutes. It will move to the BOINC > folder, check to see whether BOINC is running, and then start it if it isn't. This check will run at 5 minutes after the hour, every hour, i.e. 1:05, 2:05 ... To run every five minutes change the "5" at the very begining of the line to: */5 * * * * cd /sw/boinc/; if ps -aux | grep -v grep | grep "boinc"; then exit; else ./boinc_3.18_powerpc-apple-darwin; fi I also suggest adding the following line at the begining of the boinc.txt file: MAILTO="" This prevents cron from mailing all output from boinc & setiathome to your mbox, and having it grow to many megabytes over time. |
©2025 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.