1 |
Hi, it’s me again, :) |
2 |
|
3 |
I’m currently improving the cron setup on my Gentoo-powered NAS. I installed |
4 |
zfs-auto-snapshot, which includes scripts for hourly, daily, weekly and |
5 |
monthly creation of snapshots. |
6 |
|
7 |
The NAS uses fcron for its cron daemon. In order for the scripts to work, |
8 |
I enabled the run-crons script from sys-process/cronbase, which runs all |
9 |
scripts in /etc/cron.{hourly,daily,...}. But I have the feeling that there |
10 |
is a bug in the script: |
11 |
|
12 |
It uses state files in /var/spool/cron/lastrun/ to know when each interval |
13 |
was last run, so it only runs once per period. But: the age threshold for |
14 |
the state file is period + 5 minutes. Shouldn’t that be period - 5 minutes? |
15 |
|
16 |
My reasoning: assume run-crons is run hourly, at the 0 minute sharp. So at |
17 |
the next run, the state file is exactly one hour old. Since this is not old |
18 |
enough for the check, run-crons thinks that the last run is too recent and |
19 |
ignores this period. As a result, each period is only run on every other |
20 |
iteration. |
21 |
|
22 |
Any thoughts on that? |
23 |
Cheerio. |
24 |
|
25 |
-- |
26 |
Grüße | Greetings | Qapla’ |
27 |
Please do not share anything from, with or about me on any social network. |
28 |
|
29 |
“Today I watched my first porn movie.” – “And?” – “I was so young back then.” |