CentOS

Crontab every 5 minutes

Below is an overview of how the crontab file format

Edit your crontab with:

crontab -e

To run crontab every 5 minutes add the following to your crontab file:

*/5 * * * * /path/example-script.sh

The same applies if you want to run the script directly from the crontab, see the example below:

*/5 * * * * grep "darth vader" /var/log/maillog | mail root

Source :
http://linuxmoz.com/crontab-every-5-minutes/

Advertisements

1 thought on “Crontab every 5 minutes”

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s