From owner-freebsd-questions Mon Jan 3 19:21:24 2000 Delivered-To: freebsd-questions@freebsd.org Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (Postfix) with ESMTP id E4B9214D3B for ; Mon, 3 Jan 2000 19:21:20 -0800 (PST) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.9.3) id WAA11551; Mon, 3 Jan 2000 22:25:43 -0500 (EST) (envelope-from cjc) From: "Crist J. Clark" Message-Id: <200001040325.WAA11551@cc942873-a.ewndsr1.nj.home.com> Subject: Re: HELP: cron & /etc/periodic question. In-Reply-To: <20000103210817.12790.qmail@web125.yahoomail.com> from Joss Roots at "Jan 3, 2000 01:08:17 pm" To: osiris2002@yahoo.com (Joss Roots) Date: Mon, 3 Jan 2000 22:25:42 -0500 (EST) Cc: freebsd-questions@FreeBSD.ORG Reply-To: cjclark@home.com X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Joss Roots wrote, > Hi there, > I am running LATEST 3.4- as of yesterday. > I added a small script: > > /etc/periodic/daily/500.systemupdate > owned by root:wheel > I set its permissions to be -rwxr-xr-x Check. > this script runs 2 simple scripts from > /root/scripts > both are excutable Check. > #!/bin/sh - > /root/scripts/sysupdate > /root/scripts/portsget For debugging purposes, why not change this to, #!/bin/sh - echo "" echo "Running sysupdate:" /root/scripts/sysupdate echo "" echo "Running portsget:" /root/scripts/portsget #End This way, you can see if the file is being executed at all. > I have the default /etc/crontab > which runs periodic daily among other stuff Check. > cron can't seem to run the scripts > /etc/periodic/daily/500.systemupdate > for some reason. Put the above in for some debugging output. If you still have problems, please show us the 'daily' mail with those echos, and the 'ls -l' of both /etc/periodic/daily and /root/scripts. > anything else I have to do to add local > or custom crontab jobs like this ? Nope. You should just have to drop a file with the format, ###.filename In that directory and set executable for root. To see what is actually done, look at /usr/sbin/periodic; it's a sh script. > I did a killall -HUP crontab > and nothing. This step is not needed and will do nothing for this problem. But as an aside, might I venture to guess that those two scripts do a CVSup of the ports tree and /usr/src/sys tree? There is an easier way to do that. Edit the "SUP*" variables in /etc/make.conf appropriately and then just add something like the following to /etc/crontab, # CVSup source code and ports daily 0 4 * * * root cd /usr/src; make update > /var/log/cvsup.log 2>&1 Again, no SIGHUPs to cron are needed for changes to /etc/crontab or use of crontab(1). -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message