All,
I have setup SME 8.1 to run as a backup server using Affa 3: it does not provide any other services. The backup job is done every day on 06:30 am. Since the server is useless for 23 hours each day, the backup server is waked by WoL on 06:20 each day by my productive SME server. Additionally the backup server is sent back to sleep (signal-event halt) for the rest of the day on 07:20 by a custom cron job template. So far, so good.
Looking into the crontab, there are a couple of jobs that are foreseen to run at times when the server normally sleeps:
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
I understand that this part is generated from /etc/e-smith/templates/etc/crontab/10runparts . Should I adapt this template e.g. to the following?
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 7 * * * root run-parts /etc/cron.daily
07 7 * * 0 root run-parts /etc/cron.weekly
12 7 1 * * root run-parts /etc/cron.monthly
What about
# logrotate
12 1 */7 * * root /sbin/e-smith/signal-event logrotate
I understand that this part is generated from /etc/e-smith/templates/etc/crontab/65_logrotate . Should I adapt this template e.g. to the following?
# Just for now, do it each morning. Add logic here if we want
# to be able to tune the frequency
my $minute = 12;
my $hour = 07;
my $day = "*/$interval";
Now /etc/e-smith/templates/etc/crontab/check4updates . Should I adapt this template e.g. to the following?
if ($freq eq 'weekly') {
$min = 25;
$dom = '*';
$dow = 0;
} elsif ($freq eq 'monthly') {
$min = 25;
$dom = 1;
$dow = '*';
} else {
$min = 25;
$dom = '*';
$dow = '*';
}
Squid is not used, therefore I would leave the related template /etc/e-smith/templates/etc/crontab/squid unchanged. Is this OK?
Now template /etc/e-smith/templates/etc/crontab/statusreport. Here I don't understand where the contents of the variables
my $dow = ${statusreport}{DayOfWeek};
my $hour = ${statusreport}{Hour};
my $minute = ${statusreport}{Minute};
are coming from. As an example: how is $dow generated? Where is the variable ${statusreport}{DayOfWeek} defined? Should I change something here?
Thanks, turandot