Return to BSD News archive
Newsgroups: comp.unix.bsd.bsdi.misc Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!zombie.ncsc.mil!news.mathworks.com!gatech!howland.reston.ans.net!torn!sis!grendel.t.sheridanc.on.ca!zander From: zander@grendel.t.sheridanc.on.ca (Mark Zander) Subject: Re: Cron problems Message-ID: <DAzyv9.2GD@eclipse.sheridanc.on.ca> Sender: news@eclipse.sheridanc.on.ca (USENET News System) Nntp-Posting-Host: oa-bb19-15.t.sheridanc.on.ca Reply-To: mark.zander@sheridanc.on.ca Organization: Sheridan College X-Newsreader: TIN [version 1.2 PL2] References: <3ss48d$id6@ralph.vnet.net> Date: Fri, 30 Jun 1995 17:49:56 GMT Lines: 49 John Banghart (john@success.net) wrote: : I am trying to execute 2 scripts via cron. One every day at 1 am, and the : other every Sunday at 1am. : Here's how it looks when I do a 'crontab -l'. : # DO NOT EDIT THIS FILE - edit the master and reinstall. : # (/tmp/crontab.13603 installed on Tue Jun 27 11:56:29 1995) : # (Cron version -- =Id: crontab.c,v 2.14 1994/01/26 02:25:50 vixie Exp =) : 0 1 * * * /usr/local/etc/httpd/logs/dailystats : 0 1 * * 7 /usr/local/etc/httpd/logs/weeklystats : However, they don't appear to be running and I'm not seeing any error messages : in the email reports I get from the system. : The scripts are just sh scripts, with various unix commands and calls to a : couple of Perl scripts. : What am I missing? : I can see that it says 'DO NOT EDIT THIS FILE', but I entered these using : 'crontab -e' which I thought was correct. : -John <soap box> Its always a good idea to avoid using crontab's interactive editor. Just fire up your favorite UN*X editor and create a file which contains all the information which you want in the crontab entry. Then you just have to give the command 'contab -u <username> <filename>' to install it. One reason is you never have the option of keeping a backup if you change things. </soap box> Make sure that you are running the final scripts with verbose information. If you are using 'sh' you would put something like '#!/bin/sh -v' on the first line. I'm not sure what perl would need. Back a while we had to include a 'MAILTO' variable to set who we wanted the output mailed to. Hope this helps later. ---------------------------------------------------- Mark Zander mark.zander@sheridanc.on.ca Technical Support Sheridan College (905) 845-9430 ext. 2166 1430 Trafalger Rd (905) 815-4011 fax. Oakville, Ont. L6H 2L1 8-) -----------------------------------------------------