as far as im aware the cron just runs the generate.pl script.
So locate that (on mine its in /etc/webmin/sarg/)
then just create a cron to run that once a day/week whatever ?
as i use webmin it is all configured in there.
but to create a cron, I would just use nano to create something like this and call it like sarg.sh or something:
then chmod +x to make it executableCode:#/bin/bash perl /etc/sarg/generate.pl
and then stick it in the /etc/cron.daily folder.
Youll need to change it to whatever the location of the generate.pl is for you
(slocate is a good util i use all the time, if its installed just type "locate generate.pl" and it will show you where it is)
Last edited by RabbieBurns; 24th February 2009 at 05:03 PM. Reason: to give the .sh file a name
My mistake, I seem to have this in my crontab instead.
You can get the sarg-reports script here:Code:# use /bin/bash to run commands, instead of the default /bin/sh SHELL=/bin/bash MAILTO="email@example.com" PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin 00 08-18/1 * * * /root/sarg-reports today > /dev/null 2>&1 00 00 * * * /root/sarg-reports daily > /dev/null 2>&1 00 01 * * 1 /root/sarg-reports weekly > /dev/null 2>&1 30 02 1 * * /root/sarg-reports monthly > /dev/null 2>&1
Hightower (24th February 2009)
There are currently 1 users browsing this thread. (0 members and 1 guests)