How to setup cron

Cron is a clock daemon which allows you to start a job at specified date (and/or time) or every specified time period.

Firstly you need to install a package, do it as root:


After it the package should be installed in your system, let check it:


The output means that the package has been installed.

To know what our daemon does (run the jobs) we need to add one line into the syslog configuration.

Open /etc/syslog.conf in your favorite text editor and add the line (as root):

You can write it into a separated file, for example, cron.log.

After you changed syslog.conf you need to reconfigure syslog daemon (as root):

Refresh method sends a HUP signal to the syslogd and the daemon will reread its configuration file.


Now we need to enable the service (as root):


Let check the status of the service:

The state must be online, this means that the service works now.

From time to time you need to debug some jobs that cron runs, to increase a log level of the cron daemon you need to change service info (by default log level is 1).

To change this value run (as root):

To be sure the value changed you can test it:

Don't forget to refresh the service after changes (as root):

And now you can restart the daemon (as root):

Well, done...