LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-08-2003, 04:58 PM   #1
AMDPwred
Member
 
Registered: Dec 2001
Location: Richmond, VA
Posts: 391

Rep: Reputation: 30
Anybody run SETI on their Linux box?


I can start it up in command line mode and it runs, but I'm not sure if it stays running. Do you guys run a cron job or something?
 
Old 06-08-2003, 07:49 PM   #2
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Rep: Reputation: 30
AMDPwred,

You can add seti as a cron job alright:

Type: "crontab -e"
This brings up your crontable list in a vi editor or similar. You can put your entry for seti to this here eg:

10, 20, 30, 40, 50 * * * * $HOME/wherever/startseti > /dev/null 2> /dev/null

Save it. Now your seti job (if not already running) attempts to run every 10 minutes.

crontab -l # shows your cron jobs
# crontab -r # remove the users' crontab file


The fields are represented as:

FIELD VALUE
------------------
minute 00 to 59
hour 00 to 23 (military time)
day 1 to 31
month 1 to 12
weekday 0 to 6 (0=Sunday) Note: Linux uses sun, mon...

* Format of cron: <min> <hour> <day> <month> <day of week> <command>
0-59 0-23 1-31 1-12 0-7 (task cmd)
* "task cmd" can be a cmd or script
* An asterick '*' instead of '7' for month means every month etc.
* A '-' means such as 1-28 means a range.
* A comma ',' between 1,2,3 means a list.
* A '/' means a skip of a specified range:
eg 0-59/2 means every 2nd minute or */3 every 3rd month etc.

hope this helps?
 
Old 06-08-2003, 08:00 PM   #3
AMDPwred
Member
 
Registered: Dec 2001
Location: Richmond, VA
Posts: 391

Original Poster
Rep: Reputation: 30
Ok, so if I wanted it to run everyday, the command would look like this?

Code:
0, 0, *, *, * /opt/setiathome-3.08.i686-pc-linux-gnu/setiathome
Is that right?
 
Old 06-08-2003, 09:53 PM   #4
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Rep: Reputation: 30
no need for the commas unless you mean a list:

eg. A comma ',' between 1,2,3 means a list but...

0 0 * * * /opt/setiathome-3.08.i686-pc-linux-gnu/setiathome

0 0 means 0 mins past midnight. You might want:

0 * * * * /opt/setiathome-3.08.i686-pc-linux-gnu/setiathome

... but this means every 0 mins past every hour but what if you log in at 1 min past... you're cron job won't start for another 59 mins. So you might try:

15, 30, 45 * * * * /opt/setiathome-3.08.i686-pc-linux-gnu/setiathome


This gets it to start every 15 mins... and so on.

Again:

0-59 0-23 1-31 1-12 0-7 (task cmd)
* "task cmd" can be a cmd or script
* An asterick '*' instead of '7' for month means every month etc.
* A '-' means such as 1-28 means a range.
* A comma ',' between 1,2,3 means a list.
* A '/' means a skip of a specified range:
eg 0-59/2 means every 2nd minute or */3 every 3rd month e
 
Old 06-09-2003, 03:48 PM   #5
AMDPwred
Member
 
Registered: Dec 2001
Location: Richmond, VA
Posts: 391

Original Poster
Rep: Reputation: 30
Would this require me to be logged in?
 
Old 06-09-2003, 05:20 PM   #6
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Rep: Reputation: 30
Would this require me to be logged in?

AMDPwred,

Good question. I'm not 100% sure but I know that if you add your cronjob under your own user then yes that user needs to log in.

Not too sure if you crontab -e under root but I guess you still would have to log on.

Instead you could add just the seti start command (not the cron just the normal path & cmd) to /etc/rc.d/rc.local

This is the final script run before boot up. Again you need to test this as I haven't done this.

Anyone who knows better can you correct me? Thanks.

AMDPwred, I hope this helps you.
 
Old 06-09-2003, 05:28 PM   #7
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
I run seti constantly, at nice + 19, never even think about it...
 
Old 06-09-2003, 05:34 PM   #8
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Rep: Reputation: 30
Quote:
Originally posted by bulliver
I run seti constantly, at nice + 19, never even think about it...
bulliver,

Are you running it when you log in as your user (starting with a cronjob or other) or do you start seti somewhere else before any user logs in? eg. /etc/rc.d/rc.local
 
Old 06-10-2003, 05:16 AM   #9
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
I start it in my ~/.bashrc actually. Cron isn't neccesary because I always have it running...and I'm too lazy to figure out how to get rc.local to start it as my normal user.

Code:
~/setiathome/setiathome &
renice +19 -p `pidof -o %PPID ~/setiathome/setiathome`
You may need to adjust the path to reflect your own system.

Last edited by bulliver; 06-10-2003 at 05:35 AM.
 
Old 06-10-2003, 02:32 PM   #10
joel112
Member
 
Registered: Apr 2003
Distribution: Debian
Posts: 169

Rep: Reputation: 30
i have this problem now on slackware, if i run it as a cron job every 10 mis, will it run the whole program every 10 mins, or will it check to see if its running first, i dont want a gazillion seti clients running...
 
Old 06-10-2003, 03:04 PM   #11
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Rep: Reputation: 30
Nope, mine just runs the one unit no matter how matter how many times it checks...

again in my crontab I have:

10, 20, 30, 40, 50 * * * * $HOME/wherever/startseti > /dev/null 2> /dev/null
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't run X programs on remote linux box haora Linux - Newbie 5 08-28-2006 09:08 AM
Linux box calling a batch script on a windows box to run? Is it possible? joelhop Programming 8 05-17-2004 05:49 PM
How do i Run vnc on my linux box? hornet74 Linux - Networking 4 11-14-2003 05:52 PM
Will MS SQL run on a Linux box? cvonhelf Linux - Newbie 2 10-20-2003 03:01 PM
cost effective box to run Linux MacGuy Linux - Newbie 5 05-25-2001 03:38 AM


All times are GMT -5. The time now is 11:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration