[SOLVED] How can I get crontab to execute process every 10 minutes?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
How can I get crontab to execute process every 10 minutes?
I am trying to get a process ( SARG access log report tool ) to run every 10 minutes but I cannot get it to work.
Here is the content of the crontab file
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#* 1 * * * root usr/bin/sarg
#@hourly root usr/bin/sarg
*/10 * * * * root usr/bin/sarg
As you can see, I have commented out the "@hourly" command and inserted the /10 command to get it to execute every ten minutes but it still runs hourly.
Using the crontab -l command to list running jobs I get.
# m h dom mon dow command
1 * * * * /usr/bin/sarg
Showing that the process runs hourly, which indeed it does.
I have tried making the changes and restarting cron like this.
root@ubuntu240110-desktop:~# sudo service cron stop
root@ubuntu240110-desktop:~# sudo service cron start
cron start/running, process 16968
Any ideas how to do ?
Using Ubuntu 10.04