If you are customizing for the first time, you will have to perform
some setup steps. The steps assume that /usr/spool and /usr/lib/cron do
not exist or that they are empty directories. If these assumptions
are not true, then you need to follow the instructions in Migrating from a previous release.
- Set up an /etc/spool (or /var/spool) directory.
Consider using /var/spool rather than /etc/spool and
using a separate file system for the cron spool data.
Tip: The /var directory
is the location for IBM® products
to put their own customization and execution data. It is for IBM product usage only and cannot
be edited or modified by you. It is up to you to decide where to put
the spool directory. However, because those files are built by cron when
it runs, they are suitable for the /var directory.
In addition, because /etc typically contains a lot of data
and /var does not, using /var might keep /etc from
being overloaded.
- Create the /etc/spool directory and set its permissions
to 755.
Example: mkdir -m 755 /etc/spool
chmod 755 /etc/spool
- Remove the empty /usr/spool directory, if it exists.
Example: rmdir /usr/spool
- Create a symbolic link from /usr/spool to /etc/spool.
Example:
ln -s /etc/spool /usr/spool
- Set up an /etc/cron directory.
- Create the /etc/cron directory and set its permissions
to 755.
Example: mkdir -m 755 /etc/cron
chmod 755 /etc/cron
- Remove the empty /usr/lib/cron directory, if it exists.
Example: rmdir /usr/lib/cron
- Create a symbolic link from /usr/lib/cron to /etc/cron.
Example: ln -s /etc/cron /usr/lib/cron
- Create the /etc/spool/cron, /etc/spool/cron/atjobs and
/etc/spool/cron/crontabs directories and set their permissions
to 755.
Example: mkdir -m 755 /etc/spool/cron
chmod 755 /etc/spool/cron
mkdir -m 755 /etc/spool/cron/atjobs
chmod 755 /etc/spool/cron/atjobs
mkdir -m 755 /etc/spool/cron/crontabs
chmod 755 /etc/spool/cron/crontabs
When you are done, you have customized the cron daemon
for the first time.