periodic or crontab?

Bill Moran wmoran at
Mon Apr 26 15:41:55 PDT 2004

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.


Bill Moran
Potential Technologies

More information about the freebsd-questions mailing list