*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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 ?
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.
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: -
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.