From owner-freebsd-questions@FreeBSD.ORG Mon Apr 26 15:41:55 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F13F16A4CF for ; Mon, 26 Apr 2004 15:41:55 -0700 (PDT) Received: from internet.potentialtech.com (h-66-167-251-6.phlapafg.covad.net [66.167.251.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40ED443D64 for ; Mon, 26 Apr 2004 15:41:55 -0700 (PDT) (envelope-from wmoran@potentialtech.com) Received: from potentialtech.com (pa-plum1c-102.pit.adelphia.net [24.53.179.102]) by internet.potentialtech.com (Postfix) with ESMTP id 7E81169A71; Mon, 26 Apr 2004 18:41:54 -0400 (EDT) Message-ID: <408D8F7D.4090601@potentialtech.com> Date: Mon, 26 Apr 2004 18:38:53 -0400 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jonathon McKitrick References: <20040426222623.GA78091@dogma.freebsd-uk.eu.org> In-Reply-To: <20040426222623.GA78091@dogma.freebsd-uk.eu.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: periodic or crontab? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2004 22:41:55 -0000 Jonathon McKitrick wrote: > What are the criteria to decide if something should be executed from a > crontab, or from the periodic scripts in /usr/local/etc/periodic? I can imagine a few criteria that could apply: 1) To use periodic, you need to accept one of the schedules provided by periodic. Any other schedule will require crontab. (i.e. if you're not doing daily, weekly, or monthly, you need crontab) 2) Periodic sends messages from the script to root in an email, if that's good, then use periodic, if not, you'll need crontab. Hmmm ... that's all I can think of off the top of my head. In general, cron is a general tool for scheduling tasks, and thus is very flexable, and not very friendly (i.e. ... if you want to email the results of you scripts, you have to work that out yourself) periodic is a tool specifically for running routine maintenance scripts, thus it's not as flexible, but a bit easier to work with. For example, if you want to rsync your data with another machine once a day, periodic will work great, but if you want to schedule your Postgres database to be vacuumed once every four hours, you're going to need cron. HTH -- Bill Moran Potential Technologies http://www.potentialtech.com