Friday, August 16, 2013

crontab settings

Introduction

Cron is a system daemon used to execute desired tasks (in the background) at designated times.
A crontab is a simple text file with a list of commands meant to be run at specified times. It is edited with a command-line utility. These commands (and their run times) are then controlled by the cron daemon, which executes them in the system background. Each user has a crontab file which specifies the actions and times at which they should be executed, these jobs will run regardless of whether the user is actually logged into the system. There is also a root crontab for tasks requiring administrative privileges. This system crontab allows scheduling of systemwide tasks (such as log rotations and system database updates).

On Gnome-based Ubuntu systems Gnome Scheduled tasks tool (from the gnome-schedule package) in Applications --> System Tools provides a graphical interface with prompting for using Cron. The project website is at http://gnome-schedule.sourceforge.net/; the software is installable from the Software Center or by typing
sudo apt-get install gnome-schedule
 
 
 
You can create a cron.log file to contain just the CRON entries that show up in syslog. Note that CRON jobs will still show up in syslog if you follow the following directions.
Open the file


/etc/rsyslog.d/50-default.conf
 
Find the line that starts with:
#cron.* uncomment that line, save the file, and restart rsyslog:
sudo service rsyslog restart You should now see a cron log file here:
/var/log/cron.log Cron activity will now be logged to this file (in addition to syslog).


 

 

No comments:

Post a Comment