Help Center


Knowledge Base


[Netmail Support]

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Cron

Cron is a utility that schedules tasks to run automatically in the background at the interval specified by the cron daemon, which then executes these tasks. Crontab is the configuration file that contains a list of items to be run and their schedule, so it is in this file that the time is configured. A cronjob is the name of a single job or task.

Example

Code Block
*/5 * * * * /usr/sbin/ntpdate -u time.nist.gov

In this example, it is running the ntpdate, which synchronizes the time at an interval of five minutes against time.nist.gov.

Syntax

Editing

You can edit the crontab file by using the command

Code Block
crontab -e

or by accessing the file via an editor such as vi.

Uses

We have a number of cron jobs the most common are:

Code Block
* * * * root /opt/ma/netmail/sbin/cleancores -d 2>&1 >/dev/null

This does a clean up of the core files (mplus-cleancores)

Code Block
* * * * root /opt/ma/netmail/sbin/ndswatchdog 2>&1 >/dev/null

This does a status check on the Novell Directory Services (mplus-ndswatchdog)

Code Block
* * * * root /opt/ma/ooo/bin/test-ooo.sh 2>&1 >/dev/null

This runs a test on the attachment policy service (mplus-ooo)

Code Block
0 0 * * 0 root /opt/novell/eDirectory/bin/ndsrepair -U -A no -F /root/ndsrepair.log >> /dev/null 2>&1

This runs a repair of the Novell Directory Services (mplus-ndsrepair)

Code Block
0 * * * * root /opt/ma/netmail/sbin/nsrlupdate 2>&1 >/dev/null

his runs an update to the spam engine (mplus-nsrlupdate)

Code Block
/7 * * * * root /opt/ma/netmail/sbin/rblcheck 2>&1 >/dev/null

This runs the rblcheck tool, which re-registers your system with the service (mplus-rblcheck)

Code Block
MAILTO=""

This disables the root user from receiving system mail.

Any output from the commands above is essentially deleted by the job itself (2>&1 >/dev/null - output sent to dev/null).