LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 10-06-2002, 01:43 PM   #1
furrie
LQ Newbie
 
Registered: Dec 2001
Location: Yate, Bristol, England, UK
Distribution: CentOS, Ubuntu, FreeBSD
Posts: 23

Rep: Reputation: 15
Question /etc/crontab adjustment not taking effect :-(


Hello,

I have been looking into this on Google and the LQ site but can't find the solution to my problem...

Please can somebody help me?

I have adjusted my /etc/crontab to reflect what I want to happen...

# /etc/crontab - root's crontab for FreeBSD
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin
HOME=/var/log
#
#minute hour mday month wday who command
#
# Let's try and make some use of the free CPU cycles ;-)
0 * * * * cd /data/public/software/setiathome-3.03.i386-unknown-freebsd2.2.8; ./setiathome -nice 19 > /dev/null 2> /d
ev/null
#
#

This is most of it... (I have removed some other stuff to protect the innocent)

The command on its own does in fact, do the trick, but I don't know how to make it work as a cron job :-(

I have attempted to get it going using the least elegant method I know... (reboot) but to no avail.

Please can somebody let me know what I should do or point me in the right direction so that I may RTFM?

Many thanks in advance.
 
Old 10-07-2002, 03:25 AM   #2
Blackknight
Member
 
Registered: Apr 2002
Location: Rouen, France
Distribution: Slackware, FreeBSD
Posts: 34

Rep: Reputation: 15
I could tell you : "Read the rc.conf man page" but I will answer directly to your question with another question :
Is cron_enable set to yes in rc.conf ?

Maybe, you should take a look at /var/cron/allow and /var/cron/deny.
Is there a /var/run/cron.pid (meaning that cron is actually running) ?
Woaw, many things to look at, no ?
Last question : do you have some other job working with cron under the same user account ? The real question is : Is it cron that doesn't work or is it your script ?
 
Old 10-07-2002, 12:03 PM   #3
furrie
LQ Newbie
 
Registered: Dec 2001
Location: Yate, Bristol, England, UK
Distribution: CentOS, Ubuntu, FreeBSD
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks,

Plenty of stuff to think about, I'll be back ;-)

L8r mon ami.
 
Old 10-07-2002, 11:48 PM   #4
terek
Member
 
Registered: Jun 2002
Location: Utah
Distribution: Fedora 5
Posts: 32

Rep: Reputation: 15
I don't know if your expecting that to run every spare moment, but what it actually says is Run on the hour every hour. if you want it to run two times an hour you would do this
0,30 * * * *

That says run every hour when the minute hand strikes 0 and when the minute hand strikes 30.

When you said "lets waste some cpu cycles" that made me think you thought that that would run every waking moment.
 
Old 10-08-2002, 12:33 PM   #5
furrie
LQ Newbie
 
Registered: Dec 2001
Location: Yate, Bristol, England, UK
Distribution: CentOS, Ubuntu, FreeBSD
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks terek but it's SETI@home and rather than wasting CPU cycles, it is using those that I am not currently in need of...

Setiathome starts every hour on the hour but if it detects that is already running, it doesn't bother starting. It's just the suggested method of keeping it running should it fall over...

BlackKnight, Both cron AND my script were ok, but it would seem that I'd missed something fundamental out of the equation... I have now got it to work as desired and you'll have a laugh at this but adding the user who is running the job in front of the command seemed to help rather a lot! ;-)

This box (intY.furrie.net) basically sits in my loft purring away sweetly but I wanted the power consumption to be justified in more ways than being a firewall and email server (amongst other things) so now it works for its living: -

last pid: 7780; load averages: 1.04, 1.02, 1.00 up 0+07:00:44 18:32:37
84 processes: 2 running, 82 sleeping
CPU states: 0.0% user, 99.6% nice, 0.4% system, 0.0% interrupt, 0.0% idle
Mem: 70M Active, 17M Inact, 20M Wired, 8960K Cache, 22M Buf, 5328K Free
Swap: 512M Total, 512M Free

PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
1562 root 100 19 16040K 15488K RUN 390:28 98.97% 98.97% setiathome

Thanks for your help you two!
 
  


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
Changes to GRUB menu.lst not taking effect blair Mandriva 4 06-04-2005 09:52 AM
screen adjustment leva Linux - Newbie 3 07-23-2004 12:02 AM
Apache "ForceType" not taking effect... EnigmaX Linux - Software 0 05-10-2004 10:12 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
LILO mods not taking effect in mdk9.1 canon Linux - Software 1 05-01-2003 01:27 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 07:49 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
Open Source Consulting | Domain Registration