Easy steps and hints to create a cron task in Ubuntu

A cron task is an instruction that is performed a a certain moment, as scheduled in a file called crontab.

In order to edit the crontab, do

crontab -e

and edit the line you want, with the time schedule at the beginning.

The format is

minute day hour day_of_month month day_of_week
More info on how to set the schedule here: http://en.wikipedia.org/wiki/Cron

Remember tu reload the configuration, doing

service cron restart

If you would like to see if the cron is being executed, check the default log file (syslog):

grep CRON /var/log/syslog

source: http://askubuntu.com/questions/56683/where-is-the-cron-crontab-log

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s