Date: Mon, 26 Apr 2004 18:38:53 -0400 From: Bill Moran <wmoran@potentialtech.com> To: Jonathon McKitrick <jcm@FreeBSD-uk.eu.org> Cc: freebsd-questions@freebsd.org Subject: Re: periodic or crontab? Message-ID: <408D8F7D.4090601@potentialtech.com> In-Reply-To: <20040426222623.GA78091@dogma.freebsd-uk.eu.org> References: <20040426222623.GA78091@dogma.freebsd-uk.eu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?408D8F7D.4090601>