Periodic Scripts

Jez Hancock jez.hancock at munk.nu
Wed Mar 26 20:10:58 PST 2003


On Wed, Mar 26, 2003 at 10:42:44AM -0600, Scott Gerhardt wrote:
> My question is can I add a "periodic hourly" entry to crontab and create a
> "/usr/local/etc/periodic/hourly" directory and put the hourly scripts in
> this directory?  Will they be executed?
Create a directory:

/etc/periodic/hourly/

populating it with scripts in a manner similar to /etc/periodic/daily et al,
then add variables into your /etc/periodic.conf file for the daily scripts 
and call it from cron using:

1	*	*	*	*	root	periodic hourly

in /etc/crontab.


man periodic seems to suggest you can do this:


SYNOPSIS
     periodic directory ...

<snip>

     If an argument is an absolute directory name it is used as is, otherwise
     it is searched for under /etc/periodic and any other directories speci-
     fied by the local_periodic setting in periodic.conf(5) (see below).

     The periodic program will run each executable file in the directory or
     directories specified.  If a file does not have the executable bit set,
     it is silently ignored.
<snip>

Regards,
Jez


More information about the freebsd-isp mailing list