[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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
______________________________
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# 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
cron stop/waiting
root@ubuntu240110-desktop:~# sudo service cron start
cron start/running, process 16968
____________________________
Any ideas how to do ?
-keevill-
Using Ubuntu 10.04
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.