Duplicate monthly/daily/hourly snapshots at :00 and :15

I have sanoid running from cron on FreeBSD 14 every 15 minute. I am unexpectedly seeing duplicates of what should be “once per” snapshots at :15 as well as the expected ones at :00

Running version 2.3.0 which should have

[sanoid] implemented adding of taken snapshots to the cache file and a new parameter for setting an custom cache expire time (@phreaker0)

which seems that it would address the :00 snapshots not appearing in the cache at :15

The run time of the post_snapshot_script is logged and is 10 seconds or less.

How can I get eliminate this behavior?

mx1-2025/ROOT/default@autosnap_2025-09-29_00:00:02_daily       Sun Sep 28 17:00 2025
mx1-2025/ROOT/default@autosnap_2025-09-29_00:15:00_daily       Sun Sep 28 17:15 2025
mx1-2025/ROOT/default@autosnap_2025-09-30_00:00:02_daily       Mon Sep 29 17:00 2025
mx1-2025/ROOT/default@autosnap_2025-09-30_00:15:00_daily       Mon Sep 29 17:15 2025
mx1-2025/ROOT/default@autosnap_2025-10-01_00:00:01_monthly     Tue Sep 30 17:00 2025
mx1-2025/ROOT/default@autosnap_2025-10-01_00:00:01_daily       Tue Sep 30 17:00 2025
mx1-2025/ROOT/default@autosnap_2025-10-01_00:15:00_monthly     Tue Sep 30 17:15 2025
mx1-2025/ROOT/default@autosnap_2025-10-01_00:15:00_daily       Tue Sep 30 17:15 2025
mx1-2025/ROOT/default@autosnap_2025-10-02_00:00:01_daily       Wed Oct  1 17:00 2025
mx1-2025/ROOT/default@autosnap_2025-10-02_00:15:00_daily       Wed Oct  1 17:15 2025
mx1-2025/ROOT/default@autosnap_2025-10-03_00:00:01_daily       Thu Oct  2 17:00 2025
mx1-2025/ROOT/default@autosnap_2025-10-03_00:15:00_daily       Thu Oct  2 17:15 2025
mx1-2025/ROOT/default@autosnap_2025-10-03_16:00:01_hourly      Fri Oct  3  9:00 2025
mx1-2025/ROOT/default@autosnap_2025-10-03_16:15:00_hourly      Fri Oct  3  9:15 2025
mx1-2025/ROOT/default@autosnap_2025-10-03_17:00:01_hourly      Fri Oct  3 10:00 2025
mx1-2025/ROOT/default@autosnap_2025-10-03_17:15:00_hourly      Fri Oct  3 10:15 2025
$ cat /usr/local/etc/cron.d/sanoid.cron
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin

# See crontab(5) for field format.

# https://discourse.practicalzfs.com/t/how-to-install-sanoid-specifically-cron/1354
*/15 * * * * root TZ=UTC sanoid --cron
$ sanoid --version
/usr/local/bin/sanoid version 2.3.0
(Getopt::Long::GetOptions version 2.58, Perl version 5.42.0)
[mx1-2025]
	use_template = production
	recursive = zfs
	post_snapshot_script = /usr/local/libexec/capture-snapshot-properties.sh


#############################
# templates below this line #
#############################

# name your templates template_templatename. you can create your own, and use them in your module definitions above.

[template_demo]
	daily = 60

[template_production]
	frequently = 4
	hourly = 3
	daily = 30
	monthly = 3
	yearly = 0
	autosnap = yes
	autoprune = yes

I’m not sure if this is the solution but I think frequently = 4 tells it to keep 4 snapshots that are taken in 15 minutes intervals and since you only invoke sanoid on every xx:15 timestamp with cron, it would only ever create a “frequently”-snapshot on xx:15 (not on xx:30 and 00:45) and then keep it?

I’m not sure why there are xx:00_hourly snapshots, though.

I’m assuming here that */15 * * * * means “on the 15th minute of every hour” instead of “every 15 minutes” (which I think would be 15 * * * *).

*/15 in crontab means “fifteen times an hour.” So :00, :04, :08 … :52, :56.

Okay, then the xx:15 snapshots make no sense to me. Unless they are taken on the xx:16 invocation. But then why are there no xx:30 ones taken on xx:32 or xx:45 ones on xx:48 if frequently = 4? :thinking:

Spitballing here, but I notice you’re using recursive=zfs. That’s problematic if you ever either destroy or add new datasets beneath the parent. Although it’s less efficient, I always recommend the default recursive=yes, which avoids these issues.