From beda06610961b0e1085ae97e9267b33ce07acf01 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Wed, 11 Dec 2024 09:17:32 -0500 Subject: [PATCH] Fix up error with wrong snippet (24.04) (#3357) An obsolete CORE snippet was still being used in two articles instead of the proper SCALE one. Adjusted the snippet to make sure the html table rendered properly. --- .../CloudSyncTasksScreensSCALE.md | 2 +- .../DataProtection/RsyncTasksScreensSCALE.md | 2 +- static/includes/AdvancedScheduler.md | 94 ------------------- static/includes/SCALEAdvancedScheduler.md | 68 +++++++++----- 4 files changed, 44 insertions(+), 122 deletions(-) delete mode 100644 static/includes/AdvancedScheduler.md diff --git a/content/SCALEUIReference/DataProtection/CloudSyncTasksScreensSCALE.md b/content/SCALEUIReference/DataProtection/CloudSyncTasksScreensSCALE.md index 77996335a1..90b42ce7a8 100644 --- a/content/SCALEUIReference/DataProtection/CloudSyncTasksScreensSCALE.md +++ b/content/SCALEUIReference/DataProtection/CloudSyncTasksScreensSCALE.md @@ -142,7 +142,7 @@ The **Manage Credentials** link opens the **Backup Credentials** screen where yo {{< /truetable >}} {{< expand "Advanced Scheduler" "v" >}} -{{< include file="/static/includes/AdvancedScheduler.md" >}} +{{< include file="/static/includes/SCALEAdvancedScheduler.md" >}} {{< /expand >}} ### Advanced Options Settings diff --git a/content/SCALEUIReference/DataProtection/RsyncTasksScreensSCALE.md b/content/SCALEUIReference/DataProtection/RsyncTasksScreensSCALE.md index 43cfbbd861..9aba520f1e 100644 --- a/content/SCALEUIReference/DataProtection/RsyncTasksScreensSCALE.md +++ b/content/SCALEUIReference/DataProtection/RsyncTasksScreensSCALE.md @@ -90,7 +90,7 @@ The **More Options** specify other settings related to when and how the rsync oc {{< /expand >}} {{< expand "Advanced Scheduler" "v" >}} -{{< include file="/static/includes/AdvancedScheduler.md" >}} +{{< include file="/static/includes/SCALEAdvancedScheduler.md" >}} {{< /expand >}} {{< expand "More Options Settings" "v" >}} diff --git a/static/includes/AdvancedScheduler.md b/static/includes/AdvancedScheduler.md deleted file mode 100644 index c729fb2772..0000000000 --- a/static/includes/AdvancedScheduler.md +++ /dev/null @@ -1,94 +0,0 @@ - - -![Tasks Advanced Scheduler](/images/CORE/Tasks/TasksAdvancedScheduler.png "Tasks Advanced Scheduler") - -Choosing a **Presets** option populates the rest of the fields. -To customize a schedule, enter [crontab](https://www.freebsd.org/cgi/man.cgi?crontab(5)) values for the `Minutes/Hours/Days`. - -These fields accept standard [cron](https://www.freebsd.org/cgi/man.cgi?query=cron) values. -The simplest option is to enter a single number in the field. -The task runs when the time value matches that number. -For example, entering *10* means that the job runs when the time is ten minutes past the hour. - -An asterisk (`*`) means match all values. - -Specific time ranges are set by entering hyphenated number values. -For example, entering *30-35* in the **Minutes** field sets the task to run at minutes 30, 31, 32, 33, 34, and 35. - -You can also enter lists of values. -Enter individual values separated by a comma (`,`). -For example, entering *1,14* in the **Hours** field means the task runs at 1:00 AM (0100) and 2:00 PM (1400). - -A slash (`/`) designates a step value. -For example, while entering `*` in **Days** means the task runs every day of the month, `*/2` means the task runs every other day. - -Combining all the above examples together creates a schedule running a task each minute from 1:30-1:35 AM and 2:30-2:35 PM every other day. - -There is an option to select which **Months** the task runs. -Leaving each month unset is the same as selecting every month. - -The **Days of Week** schedules the task to run on specific days. -This is in addition to any listed days. -For example, entering *1* in **Days** and setting *Wed* for **Days of Week** creates a schedule that starts a task on the first day of the month *and* every Wednesday of the month. - -The **Schedule Preview** displays when the current settings mean the task runs. - -### Examples of CRON syntax - - - - - - - - - - - - - - - - - - - - - - - - - - -
SyntaxMeaningExamples
* Every item.* (minutes) = every minute of the hour.
* (days) = every day.
*/N Every Nth item.*/15 (minutes) = every 15th minute of the hour (every quarter hour).
*/3 (days) = every 3rd day.
*/3 (months) = every 3rd month.
Comma and hyphen/dashEach stated item (comma)
Each item in a range (hyphen/dash).
1,31 (minutes) = on the 1st and 31st minute of the hour.
1-3,31 (minutes) = on the 1st to 3rd minutes inclusive, and the 31st minute, of the hour.
mon-fri (days) = every Monday to Friday inclusive (every weekday).
mar,jun,sep,dec (months) = every March, June, September, December.
- -Days can be specified as days of month, or days of week. - -With these options, you can create flexible schedules similar to these examples: - - - - - - - - - - - - - - - - - - - - - - - - - - -
Desired scheduleValues to enter
3 times a day (at midnight, 08:00 and 16:00)months=*; days=*; hours=0/8 or 0,8,16; minutes=0
(Meaning: every day of every month, when hours=0/8/16 and minutes=0)
Every Monday, Wednesday and Friday, at 8.30 pmmonths=*; days=mon,wed,fri; hours=20; minutes=30
1st and 15th day of the month, during October to June, at 00:01 ammonths=oct-dec,jan-jun; days=1,15; hours=0; minutes=1
Every 15 minutes during the working week, which is 8am - 7pm (08:00 - 19:00) Monday to FridayNote that this requires two tasks to achieve:
(1) months=*; days=mon-fri; hours=8-18; minutes=*/15
(2) months=*; days=mon-fri; hours=19; minutes=0
We need the second scheduled item, to execute at 19:00, otherwise we would stop at 18:45. Another workaround would be to stop at 18:45 or 19:45 rather than 19:00.
diff --git a/static/includes/SCALEAdvancedScheduler.md b/static/includes/SCALEAdvancedScheduler.md index e1b2a192e9..f00152b653 100644 --- a/static/includes/SCALEAdvancedScheduler.md +++ b/static/includes/SCALEAdvancedScheduler.md @@ -34,37 +34,53 @@ The **Schedule Preview** displays when the current settings mean the task runs. ### Examples of CRON syntax +TrueNAS lets users create flexible schedules using the advanced cron syntax. +The tables below have some examples: + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
SyntaxMeaningExamples
* Every item.* (minutes) = every minute of the hour.
* (days) = every day.
*/N Every Nth item.*/15 (minutes) = every 15th minute of the hour.
*/3 (days) = every 3rd day.
*/3 (months) = every 3rd month.
Comma and hyphen/dashEach stated item (comma)
Each item in a range (hyphen/dash).
1,31 (minutes) = on the 1st and 31st minute of the hour.
1-3,31 (minutes) = on the 1st to 3rd minutes inclusive, and the 31st minute, of the hour.
mon-fri (days) = every Monday to Friday inclusive (every weekday).
mar,jun,sep,dec (months) = every March, June, September, December.
SyntaxMeaningExamples
*Every item. + * (minutes) = every minute of the hour.
+ * (days) = every day. +
*/NEvery Nth item. + */15 (minutes) = every 15th minute of the hour.
+ */3 (days) = every 3rd day.
+ */3 (months) = every 3rd month. +
Comma and hyphen/dash + Each stated item (comma)
+ Each item in a range (hyphen/dash). +
+ 1,31 (minutes) = on the 1st and 31st minute of the hour.
+ 1-3,31 (minutes) = on the 1st to 3rd minutes inclusive, and the 31st minute, of the hour.
+ mon-fri (days) = every Monday to Friday inclusive (every weekday).
+ mar,jun,sep,dec (months) = every March, June, September, December. +
You can specify days of the month or days of the week. -TrueNAS lets users create flexible schedules using the available options. The table below has some examples: -