How to use AND logic with GUI scheduler for monthly tasks?

rudds

Dabbler
Joined
Apr 17, 2018
Messages
34
I want to schedule a SMART long self-test for the first Friday of each month, and was under the impression that the scheduler operated on some kind of AND logic (i.e. "if it's this day of the month AND this day of the week AND this hour of the day, then...").

This is the result I'm getting from setting up a schedule under that assumption, but this makes it seem like it uses OR logic instead, i.e. run the test if any of these conditions are met, not if all of them are.

Screen Shot 2019-08-22 at 7.37.03 AM.png


This thing is pretty counterintuitive and limiting if that's the case. Is there a way to accomplish what I want here that I'm missing? It's relatively easy to set up scrub tasks the way I want by setting threshold days, but the other schedulers (SMART, cron, etc.) lack that setting for some reason.
 

Damianos

iXsystems
iXsystems
Joined
Apr 17, 2017
Messages
44
The UI element actually just generates a cron rule for you. The rule you are generating with those settings in the screen shot you posted is "0 23 1-7 * fri" which translates to "At 23:00 on the 1st through 7th days of the month and on Fridays." The UI component's functionality is correct or at least works as intended. Once you get out of the popup, the original menu shows the cron rule as well.

However, I consulted with our middleware team and while the fields match those of a cron rule, they are actually using smartd and not cron. Before the smart task scheduler UI can be improved to better suit this particular page, the API must be changed. A separate ticket has been created for this issue.

https://jira.ixsystems.com/browse/NAS-103226
 
Top