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 |
*/10 * * * * command
Check out this site too. Also, I think the reason your entry is not working is a typo, it should be Code:
*/10 * * * * /usr/bin/sarg |
Quote:
Thx, -keevill- |
You didn't necessarily have to be root, but you certainly need the / in front of usr/bin ;}
|
Quote:
I too prefer to understand rather than blindly follow turnkey solutions - Many thx once again ! -keevill- |
All times are GMT -5. The time now is 12:04 PM. |