How To Setup Cron Every Other Week, @Day, @Time

isopropyl

Contributor
Joined
Jan 29, 2022
Messages
159
Trying to understand the visual custom menu for cron with the threshold.
I want to setup a Scrub to occur every other week, ideally on Monday @ 3am.

Currently it shows as (0 03 * * mon)
and has a threshold of 14 days.

However, it seems to run significantly more often than once a week, at 3am.
Also is there any way to see how much the last scrub took time wise? So I can play around with the 3am marker to better fit when the server won't be in use, to avoid bogging down performance of connected devices?
 
Joined
Oct 22, 2019
Messages
3,641
There are two different things in your post: Cron Jobs and Scrub Tasks

I'm assuming you're not really using a custom Cron Job, but indeed configuring the Scrub Tasks?


However, it seems to run significantly more often than once a week, at 3am.
How did you determine this? Are you conflating it with other triggers, such as manually initiated scrubs and/or resilvers?


Also is there any way to see how much the last scrub took time wise?
In an SSH terminal: zpool status poolname | grep scan


So for example, my main storage pool last completed a scrub in just over 12 hours a couple weeks ago on Sunday, July 23.
Code:
% zpool status mypool | grep scan
  scan: scrub repaired 0B in 12:02:38 with 0 errors on Sun Jul 23 12:02:39 2023
 
Last edited:

isopropyl

Contributor
Joined
Jan 29, 2022
Messages
159
>Scrub Tasks
Yes, Scrub Tasks. My bad. However they are done on a Cron Job are they not? At least that is what the formatting seems to be for the command. I see the confusion though, because they are in two different tabs.

>How did you determine this
I had the e-mail alerts inform me when it starts and stops. It's not entirely clear because they are timestamped. But for example, I got an alert on July 24th for it starting a Scrub Task. And I got one on this past Saturday (29th).

Does the command it's using look correct for what my goal is? (0 03 * * mon)
Not sure if it's the threshold option being at 14?
 
Joined
Oct 22, 2019
Messages
3,641
Not sure if it's the threshold option being at 14?
I think "15 days" would work better in your case, since it's possible that 14 days can land "right on the money" where you do in fact get two scrubs in two weeks.
 

isopropyl

Contributor
Joined
Jan 29, 2022
Messages
159
I think "15 days" would work better in your case, since it's possible that 14 days can land "right on the money" where you do in fact get two scrubs in two weeks.
Ok I will try changing the threshold to 15, and see how it does
 
Joined
Oct 22, 2019
Messages
3,641
@isopropyl, I'm a huge fan of your drinks. My favorite is the 70% proof. Wish you would bring more flavors to market. :smile:
 
Top