diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index cdc8bc49..c6312ac0 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -67,13 +67,13 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S
| Folder | Content |
|---|---|
| `Shell` | `MainWindow` (rail and its shortcuts, taskbar progress), `ShellViewModel` (rail, sections, first run), `OsNotifications` (toasts as Windows notifications while the window is minimised or in the background), dialogs, `ErrorText` (the sentence of an error toast), `ScreenCapture` (`--capture` scenes), `SectionTemplates.xaml` (view model → view) |
-| `Sections` | One `XxxView.xaml` + `XxxViewModel` per screen: Welcome, Library, Sequence (the Edit section: the editor, and `SequencePickerView` choosing the sequence in place), Import, Archive, Jobs, Server, Settings (its last page is About) |
+| `Sections` | One `XxxView.xaml` + `XxxViewModel` per screen: Welcome, Library, Sequence (the Edit section: the editor, and `SequencePickerView` choosing the sequence in place), Import, Archive, Jobs (two tabs, Queue and Scheduled: `SchedulesView` shows `Jobs/SchedulesViewModel`), Server, Settings (its last page is About) |
| `Library` | Filter, facets, pager, timeline, saved views, quick and mass actions, remote cards and thumbnails, thumbnail cache, list export |
| `Editor` | `EditorSession` (project, undo/redo, saving, merges), `ISequenceSource` (`LocalSequenceSource`, `RemoteSequenceSource`), the steps of the Edit path (`EditPath`: their order, each step's state, the step of each finding, the memory of the step shown; tabs Analysis, Frames, Exposure, Motion, Camera, Time, Stack, Export), `PreviewRenderer`, `ExportPlanner`, `ExportSync`, `SavedCopies`, `SequenceJobs`, `ProjectFiles` (save and open `.chronos` project files) |
| `Import` | `CardPool` (inserted cards, remembered cards, folders), camera profiles, plans and choices, destinations (archive, folder, server through `ServerImportSink`), card actions (verified delete, format, eject) |
| `Archive` | `CurrentArchive`, `ArchiveTree`, figures for the charts, maintenance reports, mass rename and move, delete and trash dialogs (`SequenceDeletion`, `DeletePlans`), `ArchiveFailures` |
| `Server` | `ServerSession`, `ConnectFlow` (trust on first use), `SyncHost` (sync engine, agent, metered hold, editor connections, Export Sync), sync table, `RemoteSequenceApi` |
-| `Jobs`, `Settings`, `About` | Job list and buffering, `JobNotices` (which job endings raise a toast; `JobEndings` lets a batch speak once); settings rows (`LogSettingsRows`: Advanced's log rows), encoder and format inventories, `ProcessingTuning` (Settings › Rendering and Analysis applied to each job: parallelism, memory budget, quality), `InterfacePriority`, language catalog, naming preview; `AboutViewModel` (owned by the shell, not a section: Settings › About, the update notice of Settings › Updates and the update check on start), update check and download |
+| `Jobs`, `Settings`, `About` | Job list and buffering, `JobNotices` (which job endings raise a toast; `JobEndings` lets a batch speak once); the schedules of Jobs › Scheduled (`DesktopScheduleHost`: the desktop's `IScheduleHost` and its system schedules `archive-scan`, `index-backup`, `housekeeping`; `CacheTrimStep`, the host's clean-up step; `SchedulesViewModel`, `ScheduleRowViewModel`, `ScheduleEditorViewModel` and `ScheduleDialogs.xaml`, the in-window editor; `ScheduleText`); settings rows (`LogSettingsRows`: Advanced's log rows), encoder and format inventories, `ProcessingTuning` (Settings › Rendering and Analysis applied to each job: parallelism, memory budget, quality), `InterfacePriority`, language catalog, naming preview; `AboutViewModel` (owned by the shell, not a section: Settings › About, the update notice of Settings › Updates and the update check on start), update check and download |
| `Infrastructure` | `AppServices` (composition root), `AppSettings`, `AppLogging` (Settings › Advanced › Logs applied to the log files at start and at every save), `AppEnvironment` (installed or portable), `AppClock` (today's date, frozen by `--capture`), `StartWithWindows` (this copy's sign-in entry), `UiLanguage`, `LiveRegion`, `RenderNodeHost`, `DiagnosticsBundle`, `ShellActions` (BRIEF §8.6), `SingleInstance` (one Chronos per data folder; a later launch hands its file over a named pipe, or waits for a closing one to exit and starts in its place), device monitor |
| `DesignTime` | `SampleData`: the archive, jobs and server the screenshots and smoke tests run on, dated from the fixed `SampleData.Now` |
@@ -94,7 +94,7 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S
| Host | Composition root | What it runs |
|---|---|---|
-| Chronos (desktop) | `App/Infrastructure/AppServices` | SQLite index in `%LOCALAPPDATA%\Chronos` (or `.\data` when portable, unless the copy is in a OneDrive folder); `ArchiveService` with WIC first, then managed decoders; `ProcessingService` with Media Foundation, then managed encoders; one `JobEngine` with the handlers of both; thumbnails; `ServerSession`; `SyncHost` while signed in (sync engine and agent, upload and download handlers, metered hold, editors of server sequences); the render node while opted in and signed in; update check and download (`About/UpdateCheck`, `About/UpdateDownload`, `About/UpdateFlow`: the setup, or the portable zip for a portable copy, verified against `SHA256SUMS`, resumable, cancellable, failing after 60 s without data); diagnostics bundle; daily index backups and the restore staged in Settings › Advanced (`DatabaseBackups`) |
+| Chronos (desktop) | `App/Infrastructure/AppServices` | SQLite index in `%LOCALAPPDATA%\Chronos` (or `.\data` when portable, unless the copy is in a OneDrive folder); `ArchiveService` with WIC first, then managed decoders; `ProcessingService` with Media Foundation, then managed encoders; one `JobEngine` with the handlers of both; thumbnails; `ServerSession`; `SyncHost` while signed in (sync engine and agent, upload and download handlers, metered hold, editors of server sequences); the render node while opted in and signed in; update check and download (`About/UpdateCheck`, `About/UpdateDownload`, `About/UpdateFlow`: the setup, or the portable zip for a portable copy, verified against `SHA256SUMS`, resumable, cancellable, failing after 60 s without data); diagnostics bundle; the `Scheduler` on `DesktopScheduleHost`, started once the archive was reopened (an unplugged one is looked for every minute), whose system schedules replaced the rescan timer, the daily backup loop and the job-history purge; the restore staged in Settings › Advanced (`DatabaseBackups`) |
| Chronos Server | `Server/Hosting/ServerHost.Build` | Options from `server.json` + `CHRONOS_*`; PostgreSQL (or SQLite on Windows); `ArchiveModule` then `ProcessingModule` register job handler providers; `JobEngineHost` (renders only managed formats and MP4 jobs no render node can take, BRIEF §14.7); `RenderNodeService`/`RenderNodeMonitor`; `UploadService`; `VolumeSpace` (free space of the archive, the space path and `/data`, file system and mount from `/proc/self/mountinfo`; tests replace it); `EventHub` (WebSocket); embedded admin panel; LAN discovery beacon; Windows service host; `SchedulerHost` with the system schedules `archive-scan` (every 10 minutes, also once at start), `upload-cleanup` (every 30 minutes), `index-backup` (SQLite only, 03:00), `housekeeping` (job history, 04:00) and `audit-cleanup` (04:30), no other timer queues work |
| Chronos Uploader | `Uploader/App.xaml.cs` | `ChronosClient`, persisted queue, watch folders; no database |
| Chronos Setup | `Setup/Program` | TPK1 payload extraction, registry, shortcuts, file types named in setup's language, silent mode, uninstaller; only what starts a program its log or payload lists is changed: Windows services of those programs stopped once the programs have closed, started again (also after a failure) or deleted through the Service Control Manager (an elevated `/SERVICES … /NAMES` step when needed), sign-in entries of those programs moved to the program an upgrade renamed or removed, shared shortcuts handed to the product that keeps the program; the Server only for all users inside Program Files; "Remove my data" limited to the programs no other installed product uses |
diff --git a/docs/ui/DESIGN.md b/docs/ui/DESIGN.md
index 26fcdbc5..25d55cb2 100644
--- a/docs/ui/DESIGN.md
+++ b/docs/ui/DESIGN.md
@@ -124,7 +124,7 @@ from the SVG geometry (no raster assets checked in as sources). Badges only at
| `Export.html` | §12.3 / §11.4 | the Export step: step bar with Export current, preset cards with size/time estimate, Output panel, batch, Previous · 8 / 8 · Next sequence |
| `Import.html` | §12.4 / §13 | card profile, sessions, plan, verification, after-import actions |
| `Archive.html` | §12.5 | tree, mass operations, stats, verify/rebuild, maintenance |
-| `Jobs.html` | §12.6 | filters, queue order, expandable log, retry/open/folder |
+| `Jobs.html` | §12.6 | filters, queue order, expandable log, retry/open/folder; a `Queue · Scheduled` segmented control first in the toolbar (owner review 2, R10): Scheduled is a table (on switch, name, action, when, next run, last result, Run now · Edit · Reset or Delete), the selected schedule's last runs under it (Show in queue), New schedule at the toolbar's end and the editor as an in-window dialog; jobs a schedule queued carry an Accent `Scheduled` pill after their target |
| `Server.html` | §12.7 / §14 | connection with TOFU fingerprint, account and quota, render node, sync table, conflicts |
| `Settings.html` | §12.8 | section list (About last, §12.9), Rendering section, encoder table, self-test |
| `Welcome.html` | §12.1 | first run: local archive / adopt folder / connect; consent line; card toast |
@@ -134,6 +134,6 @@ from the SVG geometry (no raster assets checked in as sources). Badges only at
| `Components.html` | §12.1 | the control kit above, with hex values and state rules |
| `Icon.html` | §17 | construction, sizes, variants, wordmark |
-Missing on purpose (build from the brief and this kit): the Settings › About page, Login dialog, the Edit picker
+Missing on purpose (build from the brief and this kit): the Settings › About page, Login dialog, Jobs › Scheduled and its editor, the Edit picker
and the other steps (Analysis, Frames, Motion, Camera, Time, Stack), Import "Show plan",
Archive rebuild dialog, the admin Archive/Jobs/Settings/Logs pages. Reuse the shell and the kit; do not invent new colours.
diff --git a/i18n/ar/Settings.ar.resx b/i18n/ar/Settings.ar.resx
index abec30b2..50c26155 100644
--- a/i18n/ar/Settings.ar.resx
+++ b/i18n/ar/Settings.ar.resx
@@ -56,7 +56,6 @@
بلا نسخ وكيلةلم تُحفظ إعدادات الأرشيفاختيار مجلد الأرشيف
- إعادة الفحص كلمعاينةحجم النسخ الوكيلةإعادة تعيين الأرشيف
diff --git a/i18n/ar/Tooltips.ar.resx b/i18n/ar/Tooltips.ar.resx
index 3f56f8ff..0bebab70 100644
--- a/i18n/ar/Tooltips.ar.resx
+++ b/i18n/ar/Tooltips.ar.resx
@@ -343,7 +343,6 @@
تعمل الآن أو متوقفة مؤقتًاإظهار المجلد في مستكشف الملفاتإخفاء السجل
- تُزال المهام المنتهية الأقدم من ذلك عند بدء تشغيل Chronosجلب الصور من بطاقة أو مجلد؛ ثم تظهر هنا عمليات الاستيراد والتحليل والتصييررفع الأولوية: تعمل قبل المهام ذات الأولوية الأدنىفتح ما عملت عليه هذه المهمة
@@ -616,7 +615,6 @@
الإصدار، والبنية، والنظام، والترخيص، وشيفرة جهات خارجيةالوضع المحمول، والسجلات، والتشخيص، والنسخ الاحتياطي لقاعدة البيانات واستعادتها، وإعادة التعيينعرض التحليل، وحدود الليل والنجوم، والتحليل المعمّق
- مجلد الأرشيف، وقوالب التسمية، وحجم النسخ الوكيلة والصور المصغرة، وإعادة الفحصأداة فك الترميز التي تعالج كل تنسيق على هذا الكمبيوتر، وروابط تثبيت برامج الترميزاللغة، والسمة، وبدء التشغيل، والإشعاراتقواعد الجلسات، والتحقق، والتكرارات، والإجراءات بعد الاستيراد
@@ -627,7 +625,6 @@
عدد الصور التي تعالجها المهمة الجارية في وقت واحد؛ وتعمل المهام واحدة تلو الأخرى. العدد الأقل يترك مجالًا أكبر للبرامج الأخرى · Enter للتطبيق، Esc للتراجعتلقائي: نصف النوى المنطقيةالعودة إلى «تلقائي»: نصف النوى المنطقية
- مدى تكرار إعادة Chronos فحص الأرشيف بحثًا عن تغييرات أُجريت في مكان آخر، كالتي يُجريها خادم يتشاركهمفعّل عند وجود portable.txt بجانب Chronos.exe: تبقى كل البيانات في مجلد البيانات الخاص بهاستخدام مرمّز عتادي عندما يدعم الإعداد المسبق، وإلا فالمرمّز البرمجيأول ثلاثة أسماء لاستيراد تجريبي بهذه القوالب
diff --git a/i18n/bg/Settings.bg.resx b/i18n/bg/Settings.bg.resx
index dbe98102..c48ff577 100644
--- a/i18n/bg/Settings.bg.resx
+++ b/i18n/bg/Settings.bg.resx
@@ -56,7 +56,6 @@
НямаНастройките на архива не са записаниИзберете папката на архива
- Повторно сканиране на всекиВизуализацияРазмер на проксиНулиране на архива
diff --git a/i18n/bg/Tooltips.bg.resx b/i18n/bg/Tooltips.bg.resx
index 5ad99c59..1582ec4a 100644
--- a/i18n/bg/Tooltips.bg.resx
+++ b/i18n/bg/Tooltips.bg.resx
@@ -339,7 +339,6 @@
Работят в момента или са на паузаПоказва папката във файловия мениджърСкрива журнала
- Завършените задачи, по-стари от това, се премахват при стартиране на ChronosИмпортира снимки от карта или папка; след това импортиранията, анализите и рендериранията се показват тукПовишава приоритета: задачата се изпълнява преди задачите с по-нисък приоритетОтваря това, върху което е работила задачата
@@ -580,7 +579,6 @@
Версия, компилация, система, лиценз, код на трети страниПреносим режим, журнали, диагностика, резервно копие и възстановяване на базата данни, нулиранеШирина за анализ, прагове за нощ и звезди, задълбочен анализ
- Папка на архива, шаблони за имена, размер на прокси и миниатюри, повторни сканиранияКой декодер обработва всеки формат на този компютър, връзки за инсталиране на кодециЕзик, тема, стартиране, известияПравила за сесиите, проверка, дубликати, действия след импортиране
@@ -591,7 +589,6 @@
Снимки, които изпълняваната задача обработва наведнъж; задачите се изпълняват една по една. По-малък брой оставя повече ресурси за другите програми · Enter прилага, Esc връщаАвто: половината от логическите ядраВръщане към „Авто“: половината от логическите ядра
- Колко често Chronos сканира отново архива за промени, направени другаде, например от сървър, който го споделяВключен, когато portable.txt е до Chronos.exe: всички данни остават в неговата папка с данниИзползва хардуерен кодер, когато някой поддържа пресета; иначе софтуеренПървите три имена от примерно импортиране с тези шаблони
diff --git a/i18n/cs/Settings.cs.resx b/i18n/cs/Settings.cs.resx
index 32ec52f6..2af7f019 100644
--- a/i18n/cs/Settings.cs.resx
+++ b/i18n/cs/Settings.cs.resx
@@ -56,7 +56,6 @@
ŽádnéNastavení archivu nebylo uloženoVyberte složku archivu
- Interval prohledáváníNáhledVelikost proxyResetovat archiv
diff --git a/i18n/cs/Tooltips.cs.resx b/i18n/cs/Tooltips.cs.resx
index b7826d96..d1f9e4c9 100644
--- a/i18n/cs/Tooltips.cs.resx
+++ b/i18n/cs/Tooltips.cs.resx
@@ -341,7 +341,6 @@
Právě běží nebo jsou pozastavenéZobrazí složku v PrůzkumníkoviSkryje protokol
- Dokončené úlohy starší než tato doba se při spuštění Chronos odstraníImportuje fotografie z karty nebo složky; importy, analýzy a rendery se pak zobrazí zdeZvýší prioritu: úloha poběží před úlohami s nižší prioritouOtevře to, na čem úloha pracovala
@@ -598,7 +597,6 @@
Verze, sestavení, systém, licence, kód třetích stranPřenosný režim, protokoly, diagnostika, záloha a obnovení databáze, resetováníŠířka analýzy, prahy noci a hvězd, hloubková analýza
- Složka archivu, šablony pojmenování, velikost proxy a miniatur, opakované prohledáváníKterý dekodér zpracovává jednotlivé formáty v tomto počítači, odkazy na instalaci kodekůJazyk, motiv, spuštění, oznámeníPravidla úseků, ověření, duplikáty, akce po importu
@@ -609,7 +607,6 @@
Počet fotografií, které běžící úloha zpracovává najednou; úlohy běží jedna po druhé. Menší počet ponechá více prostoru jiným programům · Enter použije, Esc vrátí zpětAuto: polovina logických jaderZpět na Auto: polovina logických jader
- Jak často Chronos znovu prohledává archiv kvůli změnám provedeným jinde, například serverem, který ho sdílíZapnuto, když vedle souboru Chronos.exe leží portable.txt: všechna data zůstávají v jeho datové složcePoužije hardwarový kodér, pokud předvolbu podporuje; jinak softwarovýPrvní tři názvy ukázkového importu s těmito šablonami
diff --git a/i18n/da/Settings.da.resx b/i18n/da/Settings.da.resx
index a1f2737a..0d01a3b0 100644
--- a/i18n/da/Settings.da.resx
+++ b/i18n/da/Settings.da.resx
@@ -56,7 +56,6 @@
IngenArkivindstillingerne blev ikke gemtVælg arkivmappen
- ScanningsintervalForhåndsvisningProxystørrelseNulstil arkiv
diff --git a/i18n/da/Tooltips.da.resx b/i18n/da/Tooltips.da.resx
index b6eeff67..bd505353 100644
--- a/i18n/da/Tooltips.da.resx
+++ b/i18n/da/Tooltips.da.resx
@@ -339,7 +339,6 @@
Arbejder nu eller er sat på pauseVis mappen i StifinderSkjul loggen
- Færdige job, der er ældre end dette, fjernes, når Chronos starterHent fotos ind fra et kort eller en mappe; importer, analyser og renderinger vises derefter herHæv prioriteten: jobbet kører før job med lavere prioritetÅbn det, som dette job arbejdede på
@@ -580,7 +579,6 @@
Version, build, system, licens, tredjepartskodePortabel tilstand, logge, diagnosticering, sikkerhedskopiering og gendannelse af databasen, nulstillingAnalysebredde, tærskler for nat og stjerner, dybdeanalyse
- Arkivmappe, navneskabeloner, proxy- og miniaturestørrelse, scanningsintervalHvilken dekoder der læser hvert format på denne pc, links til installation af codecsSprog, tema, opstart, meddelelserSessionsregler, verificering, dubletter, handlinger efter import
@@ -591,7 +589,6 @@
Fotos, som det kørende job behandler samtidig; job kører ét ad gangen. Færre giver mere plads til andre programmer · Enter anvender, Esc fortryderAuto: halvdelen af de logiske kernerTilbage til Auto: halvdelen af de logiske kerner
- Hvor ofte Chronos scanner arkivet igen for ændringer foretaget andre steder, f.eks. af en server, der deler detTil, når portable.txt ligger ved siden af Chronos.exe: alle data bliver i programmets datamappeBrug en hardwareencoder, når en understøtter forudindstillingen; ellers softwareDe tre første navne fra en prøveimport med disse skabeloner
diff --git a/i18n/de/Settings.de.resx b/i18n/de/Settings.de.resx
index 8c5b1809..7615fe6e 100644
--- a/i18n/de/Settings.de.resx
+++ b/i18n/de/Settings.de.resx
@@ -56,7 +56,6 @@
KeineDie Archiveinstellungen wurden nicht gespeichertArchivordner auswählen
- Erneut scannen alleVorschauProxygrößeArchiv zurücksetzen
diff --git a/i18n/de/Tooltips.de.resx b/i18n/de/Tooltips.de.resx
index 967aaa46..954cabb6 100644
--- a/i18n/de/Tooltips.de.resx
+++ b/i18n/de/Tooltips.de.resx
@@ -339,7 +339,6 @@
Laufen gerade oder sind angehaltenOrdner im Explorer anzeigenProtokoll ausblenden
- Abgeschlossene Aufträge, die älter sind, werden beim Start von Chronos entferntFotos von einer Karte oder aus einem Ordner importieren; Importe, Analysen und Renderings erscheinen dann hierPriorität erhöhen: Der Auftrag läuft vor Aufträgen mit niedrigerer PrioritätÖffnen, woran dieser Auftrag gearbeitet hat
@@ -580,7 +579,6 @@
Version, Build, System, Lizenz, Code von DrittanbieternPortabler Modus, Protokolle, Diagnose, Sicherung und Wiederherstellung der Datenbank, ZurücksetzenAnalysebreite, Schwellenwerte für Nacht und Sterne, Tiefenanalyse
- Archivordner, Namensvorlagen, Proxy- und Miniaturgröße, erneutes ScannenWelcher Decoder jedes Format auf diesem PC verarbeitet, Links zur Codec-InstallationSprache, Design, Start, BenachrichtigungenSitzungsregeln, Prüfung, Duplikate, Aktionen nach dem Import
@@ -591,7 +589,6 @@
Fotos, die der laufende Auftrag gleichzeitig verarbeitet; Aufträge laufen nacheinander. Weniger lassen anderen Programmen mehr Raum · Enter übernimmt, Esc macht rückgängigAuto: die Hälfte der logischen KerneZurück zu Auto: die Hälfte der logischen Kerne
- Wie oft Chronos das Archiv erneut nach Änderungen scannt, die anderswo vorgenommen wurden, etwa von einem Server, der es mitbenutztAktiv, wenn portable.txt neben Chronos.exe liegt: Alle Daten bleiben im Datenordner danebenEinen Hardware-Encoder verwenden, wenn einer die Vorgabe unterstützt, sonst SoftwareDie ersten drei Namen eines Beispielimports mit diesen Vorlagen
diff --git a/i18n/el/Settings.el.resx b/i18n/el/Settings.el.resx
index 7dcccfd2..5d6660b9 100644
--- a/i18n/el/Settings.el.resx
+++ b/i18n/el/Settings.el.resx
@@ -56,7 +56,6 @@
ΚανέναΟι ρυθμίσεις της αρχειοθήκης δεν αποθηκεύτηκανΕπιλέξτε τον φάκελο της αρχειοθήκης
- Νέα σάρωση κάθεΠροεπισκόπησηΜέγεθος proxyΕπαναφορά ρυθμίσεων
diff --git a/i18n/el/Tooltips.el.resx b/i18n/el/Tooltips.el.resx
index e59ae447..55db99ad 100644
--- a/i18n/el/Tooltips.el.resx
+++ b/i18n/el/Tooltips.el.resx
@@ -339,7 +339,6 @@
Εκτελούνται τώρα ή είναι σε παύσηΕμφάνιση του φακέλου στην Εξερεύνηση αρχείωνΑπόκρυψη της καταγραφής
- Οι ολοκληρωμένες εργασίες που είναι παλαιότερες από αυτό το διάστημα καταργούνται κατά την εκκίνηση του ChronosΕισαγωγή φωτογραφιών από κάρτα ή φάκελο. Οι εισαγωγές, οι αναλύσεις και οι αποδόσεις εμφανίζονται στη συνέχεια εδώΑύξηση της προτεραιότητας: εκτελείται πριν από εργασίες χαμηλότερης προτεραιότηταςΆνοιγμα του αντικειμένου αυτής της εργασίας
@@ -580,7 +579,6 @@
Έκδοση, δομή, σύστημα, άδεια χρήσης, κώδικας τρίτωνΦορητή λειτουργία, αρχεία καταγραφής, διαγνωστικά, αντίγραφο ασφαλείας και επαναφορά της βάσης δεδομένων, προεπιλογέςΠλάτος ανάλυσης, όρια νύχτας και αστεριών, ανάλυση σε βάθος
- Φάκελος αρχειοθήκης, πρότυπα ονοματοδοσίας, μέγεθος proxy και μικρογραφιών, νέες σαρώσειςΠοιος αποκωδικοποιητής χειρίζεται κάθε μορφή σε αυτόν τον υπολογιστή, σύνδεσμοι εγκατάστασης codecΓλώσσα, θέμα, εκκίνηση, ειδοποιήσειςΚανόνες συνεδριών, επαλήθευση, διπλότυπα, ενέργειες μετά την εισαγωγή
@@ -591,7 +589,6 @@
Φωτογραφίες που επεξεργάζεται ταυτόχρονα η εργασία σε εκτέλεση. Οι εργασίες εκτελούνται μία τη φορά. Λιγότερες αφήνουν περισσότερο χώρο σε άλλα προγράμματα · Enter για εφαρμογή, Esc για αναίρεσηΑυτόματο: οι μισοί λογικοί πυρήνεςΕπαναφορά σε Αυτόματο: οι μισοί λογικοί πυρήνες
- Πόσο συχνά το Chronos σαρώνει ξανά την αρχειοθήκη για αλλαγές που έγιναν αλλού, για παράδειγμα από έναν διακομιστή που τη μοιράζεταιΕνεργή όταν το portable.txt βρίσκεται δίπλα στο Chronos.exe: όλα τα δεδομένα μένουν στον φάκελο δεδομένων τουΧρήση κωδικοποιητή υλικού όταν κάποιος υποστηρίζει την προρύθμιση, διαφορετικά κωδικοποιητή λογισμικούΤα τρία πρώτα ονόματα μιας δοκιμαστικής εισαγωγής με αυτά τα πρότυπα
diff --git a/i18n/en/Jobs.resx b/i18n/en/Jobs.resx
index 47ca6e4e..e6a89319 100644
--- a/i18n/en/Jobs.resx
+++ b/i18n/en/Jobs.resx
@@ -24,6 +24,39 @@
TargetWhere{0} / {1}
+ Action
+ Catch up
+ Daily
+ Day of month
+ Days
+ days
+ Deep analysis
+ Report only
+ On
+ Every
+ Full scan
+ Edit {0}long
+ Interval
+ Copies kept
+ Monthly
+ Name
+ Older than
+ At most
+ % of sequences
+ Priority
+ Rebuild all
+ Not accepted
+ Repeat
+ Save
+ Not saved
+ Steps
+ Time
+ Unit
+ days
+ hours
+ minutes
+ Unverified for
+ WeeklyNo jobs yetAll · {0}Done · {0}
@@ -32,6 +65,7 @@
Running · {0}History keeps {0} dayHistory keeps {0} days
+ Full history keptAdopt folderIndex backupClean-up
@@ -53,6 +87,9 @@
after {0}nextPaused for a higher-priority job ({0}); resumes by itselflong: job log line
+ Cache: {0} of {1} used, nothing to freelong
+ Cache not trimmed: the folder is not a Chronos cache folderlong
+ Cache trimmed: {0} of {1} used, freed: {2}longNo log lines yetHide logShow log
@@ -63,6 +100,73 @@
Rendering settings{0} · {1}{0}: {1}invariant
+ Analysis
+ Index backup
+ Clean-up
+ Duplicates report
+ Maintenance
+ Orphans report
+ Proxies
+ Archive scan
+ Thumbnails
+ Integrity check
+ Action
+ Last result
+ Name
+ Next run
+ On
+ When
+ {0}, {1}
+ Delete
+ Delete {0}?long
+ The schedule stops for good; the jobs it queued stay in the history.long
+ Edit
+ On
+ Schedule not changed
+ Job hidden
+ Keep
+ Last run {0}
+ New schedule
+ No runs yet
+ Schedules not running
+ Off
+ failed
+ never run
+ queued
+ nothing to do
+ skipped: offline
+ skipped: busy
+ not available
+ Background
+ Normal
+ High
+ Reset
+ Reset {0}?long
+ Its recurrence, parameters and options go back to the defaults of this PC; its history stays.long
+ Run now
+ Last runs
+ Show in queue
+ Audit log
+ Cache trim
+ Job history
+ Trash report
+ Archive scan
+ Housekeeping
+ Index backup
+ Today {0}
+ Tomorrow {0}
+ Daily at {0}
+ Every day
+ Every {0} days
+ Every hour
+ Every {0} hours
+ Invalid recurrence
+ Every {0} minute
+ Every {0} minutes
+ Monthly, day {0} at {1}
+ {0} at {1}
+ Yesterday {0}
+ ScheduledSearch target or kind{0} fps{0}/s
@@ -74,6 +178,9 @@
queuedrunning{0} · {1}
+ Jobs view
+ Queue
+ Scheduled{0} → {1}invariant; {0} sequence title; {1} export preset{0} ← {1}invariant; right-to-left languages: the arrow points from the sequence to the presetthis PC
diff --git a/i18n/en/Settings.resx b/i18n/en/Settings.resx
index 4840ef31..0e6e5694 100644
--- a/i18n/en/Settings.resx
+++ b/i18n/en/Settings.resx
@@ -72,7 +72,6 @@
NoneThe archive settings were not savedlongChoose the archive folder
- Rescan everyPreviewProxy sizeReset archive
diff --git a/i18n/en/Tooltips.resx b/i18n/en/Tooltips.resx
index 7a8ece3c..55622c86 100644
--- a/i18n/en/Tooltips.resx
+++ b/i18n/en/Tooltips.resx
@@ -333,6 +333,40 @@
One sequence per file format for the whole folder, subfolders included when scanned; cameras and pauses are ignoredStop this job; Retry continues later from its last checkpointHide finished jobs from the list; they stay in the history
+ Close without saving
+ A run missed while Chronos was closed happens once when it starts
+ Create the schedule
+ Day 1 to 28, which every month has
+ Sequences the scan indexes also get a deep analysis
+ A deep analysis of the sequences without one, instead of a light one
+ Lists what the maintenance would do without changing anything
+ Off, the schedule never runs by itself
+ How many minutes (5 to 1,440), hours (1 to 168) or days (1 to 366)
+ Reads every file again, not only those whose date or size changed
+ How many copies of the index are kept; older ones are deleted
+ Every day at a time
+ At a fixed interval: every n minutes, hours or days
+ On one day of the month at a time
+ On some days of the week at a time
+ Shown in the list of schedules
+ At most {0} characters
+ Give the schedule a name
+ Choose at least one day
+ Choose at least one step
+ A whole number from {0} to {1}
+ Removes entries older than this many days; 0 keeps everything
+ At most this share of the archive's sequences per run, the least recently verified first
+ Background jobs wait for the others; High ones run before normal ones
+ Makes them again for every sequence, not only those without
+ Chronos did not accept this schedule (field {0})
+ Save the changes
+ A system schedule keeps its action
+ A system schedule keeps its name
+ Time of day on this PC's clock, as hours and minutes (03:00)
+ A time of day as hours and minutes, such as 03:00
+ Minutes, hours or days
+ Only sequences not verified for this many days; 0 checks any
+ When it runs, as the list shows itEvery jobFinished jobsStopped with an error or cancelled
@@ -340,7 +374,7 @@
Working now or pausedShow the folder in ExplorerHide the log
- Finished jobs older than this are removed when Chronos starts
+ Finished jobs older than this are removed by the Housekeeping schedule (Scheduled tab)Bring photos in from a card or a folder; imports, analyses and renders then show up hereRaise the priority: it runs before jobs of lower priorityOpen what this job worked on
@@ -353,6 +387,54 @@
Parallelism, hardware preference, memory budgetPut the job back in the queue; it continues from its checkpointRun again from the last checkpoint
+ Analyses the sequences without a current analysis
+ Copies the index into the backups folder and keeps the newest copies
+ Removes what Chronos no longer needs, such as old job history; never your photos
+ Lists the duplicate photos in the job log
+ Runs the archive maintenance; Report only lists what it would do
+ Lists in the job log where the index and the disk disagree
+ Makes the proxies of the sequences without them
+ Incremental scan of the archive for changes made elsewhere
+ Makes the thumbnails of the sequences without them
+ Checks the hashes of the originals, the least recently verified first
+ A run missed while Chronos was closed is skipped
+ A run missed while Chronos was closed happens when it starts
+ Delete this schedule; the jobs it queued stay in the history
+ Change when it runs and its options
+ Off: it never runs by itself · click to turn it on
+ On: it runs by itself · click to turn it off (Run now still works)
+ Clear done hides it from the queue; it stays in the history
+ Keep the schedule
+ Keep your changes
+ Create a schedule: an action, when it runs and its options
+ Next run {0}
+ Off: it runs only with Run now
+ The next run is computed at the next check
+ Schedules run once the index is open; the log says why they did not start
+ The run could not queue its jobs: {0}
+ Not run yet
+ Its jobs were queued
+ Nothing was left to do
+ Skipped: the archive was offline, unplugged or read-only
+ Skipped: the previous run, or the same work, was still waiting or running
+ This PC cannot run this action
+ Its jobs run at priority {0}
+ Put this schedule back to the defaults of this PC; asks first
+ Run it once now, as its next run would; the next run stays as it is
+ When the run queued the job
+ The jobs this schedule queued, newest first
+ Show this job in the queue with its log
+ Removes audit entries older than the limit
+ Trims the cache to Settings › Storage › Cache limit, oldest files first
+ Removes finished jobs older than the limit
+ Lists trash entries older than the limit; nothing is deleted
+ {0} is one of this PC's own schedules: it can be edited, turned off or reset, not deleted
+ This PC has no worker for this action
+ The index has no file to copy
+ Not available on this PC
+ The index is on PostgreSQL, which its own tools back up
+ The archive makes no proxies (Settings › Archive › Proxies)
+ Queued by a schedule (Scheduled tab)Filter by target or kind as you typeOpen what this job worked on to see the problemShow the last lines of the log
@@ -362,6 +444,8 @@
Resume continues from the checkpointWaits for its turn on this PCProgress is saved at each checkpoint
+ Jobs waiting, running and finished
+ Recurring jobs this PC queues by itself: scans, backups, checks and clean-upsIndex photos you already have, in place; choose their top folderDeep analysis of every frame · runs as a job in the backgroundDeep analysis of the selected sequences · runs as one job
@@ -586,7 +670,7 @@
Version, build, system, licence, third-party codePortable mode, logs, diagnostics, database backup and restore, resetAnalysis width, night and star thresholds, deep analysis
- Archive folder, naming templates, proxy and thumbnail size, rescans
+ Archive folder, naming templates, proxy and thumbnail sizeWhich decoder handles each format on this PC, codec install linksLanguage, theme, startup, notificationsSession rules, verification, duplicates, after-import actions
@@ -598,7 +682,6 @@
Photos the running job processes at once; jobs run one at a time. Fewer leave more room to other programs · Enter applies, Esc revertsAuto: half the logical coresBack to Auto: half the logical cores
- How often Chronos rescans the archive for changes made elsewhere, such as by a server sharing itOn when portable.txt sits next to Chronos.exe: all data stays in its data folderUse a hardware encoder when one supports the preset; software otherwiseFirst three names of a sample import with these templates
diff --git a/i18n/es/Settings.es.resx b/i18n/es/Settings.es.resx
index 67c0065d..bf963295 100644
--- a/i18n/es/Settings.es.resx
+++ b/i18n/es/Settings.es.resx
@@ -56,7 +56,6 @@
NingunoNo se guardó la configuración de la fototecaElegir la carpeta de la fototeca
- Volver a escanear cadaVista previaTamaño de proxyRestablecer fototeca
diff --git a/i18n/es/Tooltips.es.resx b/i18n/es/Tooltips.es.resx
index 34c87868..ce2ee4e9 100644
--- a/i18n/es/Tooltips.es.resx
+++ b/i18n/es/Tooltips.es.resx
@@ -339,7 +339,6 @@
En ejecución ahora o en pausaMuestra la carpeta en el ExploradorOculta el registro
- Las tareas terminadas más antiguas que esto se eliminan al iniciar ChronosImporta fotos de una tarjeta o una carpeta; las importaciones, los análisis y los renderizados aparecerán aquíSube la prioridad: se ejecuta antes que las tareas de menor prioridadAbre aquello en lo que trabajó esta tarea
@@ -580,7 +579,6 @@
Versión, compilación, sistema, licencia, código de tercerosModo portátil, registros, diagnóstico, copia de seguridad y restauración de la base de datos, restablecimientoAncho de análisis, umbrales de noche y de estrellas, análisis profundo
- Carpeta de la fototeca, plantillas de nombres, tamaño de proxy y de miniatura, escaneos periódicosQué decodificador lee cada formato en este equipo, enlaces para instalar códecsIdioma, tema, inicio, notificacionesReglas de sesión, verificación, duplicados, acciones tras la importación
@@ -591,7 +589,6 @@
Fotos que la tarea en curso procesa a la vez; las tareas se ejecutan de una en una. Cuantas menos, más margen queda para otros programas · Enter aplica, Esc revierteAuto: la mitad de los núcleos lógicosVolver a Auto: la mitad de los núcleos lógicos
- Con qué frecuencia Chronos vuelve a escanear la fototeca en busca de cambios hechos en otro lugar, por ejemplo por un servidor que la comparteActivado cuando portable.txt está junto a Chronos.exe: todos los datos se quedan en su carpeta de datosUsa un codificador por hardware cuando alguno admite el preajuste; si no, por softwarePrimeros tres nombres de una importación de ejemplo con estas plantillas
diff --git a/i18n/et/Settings.et.resx b/i18n/et/Settings.et.resx
index 5140c0f5..761858a0 100644
--- a/i18n/et/Settings.et.resx
+++ b/i18n/et/Settings.et.resx
@@ -56,7 +56,6 @@
ProksidetaArhiivi sätteid ei salvestatudVali arhiivikaust
- Uuesti skannimise intervallEelvaadeProksi suurusLähtesta arhiivi sätted
diff --git a/i18n/et/Tooltips.et.resx b/i18n/et/Tooltips.et.resx
index baa3f306..846eae42 100644
--- a/i18n/et/Tooltips.et.resx
+++ b/i18n/et/Tooltips.et.resx
@@ -339,7 +339,6 @@
Praegu töös või peatatudKuvage kaust failihaldurisPeitke logi
- Sellest vanemad lõpetatud tööd eemaldatakse Chronose käivitumiselTooge fotod kaardilt või kaustast; impordid, analüüsid ja renderdused ilmuvad seejärel siiaTõstke prioriteeti: töö käivitub enne madalama prioriteediga töidAvage see, millega töö tegeles
@@ -580,7 +579,6 @@
Versioon, järk, süsteem, litsents, kolmanda osapoole koodKaasaskantav režiim, logid, diagnostika, andmebaasi varundamine ja taastamine, lähtestamineAnalüüsi laius, öö- ja tähelävendid, süvaanalüüs
- Arhiivikaust, nimemallid, prokside ja pisipiltide suurus, uuesti skannimineMilline dekodeerija käsitleb selles arvutis iga vormingut, koodekite installilingidKeel, kujundus, käivitus, teatisedSeansireeglid, kontrollimine, duplikaadid, toimingud pärast importimist
@@ -591,7 +589,6 @@
Fotod, mida käimasolev töö korraga töötleb; tööd käivad ükshaaval. Väiksem arv jätab teistele programmidele rohkem ruumi · Enter rakendab, Esc taastabAuto: pool loogilistest tuumadestTagasi režiimile Auto: pool loogilistest tuumadest
- Kui tihti Chronos skannib arhiivi uuesti, et leida mujal (näiteks arhiivi jagavas serveris) tehtud muudatusiSees, kui portable.txt asub Chronos.exe kõrval: kõik andmed jäävad selle andmekaustaKasutab riistvarakodeerijat, kui see toetab eelseadistust; muul juhul tarkvaraNende mallidega näidisimpordi kolm esimest nime
diff --git a/i18n/fi/Settings.fi.resx b/i18n/fi/Settings.fi.resx
index d7909892..0c3511de 100644
--- a/i18n/fi/Settings.fi.resx
+++ b/i18n/fi/Settings.fi.resx
@@ -56,7 +56,6 @@
Ei proxyjaArkiston asetuksia ei tallennettuValitse arkistokansio
- Uudelleenskannauksen väliEsikatseluProxyn kokoPalauta arkiston oletukset
diff --git a/i18n/fi/Tooltips.fi.resx b/i18n/fi/Tooltips.fi.resx
index 8b5a67ed..34d34667 100644
--- a/i18n/fi/Tooltips.fi.resx
+++ b/i18n/fi/Tooltips.fi.resx
@@ -339,7 +339,6 @@
Käynnissä tai keskeytettyNäytä kansio ResurssienhallinnassaPiilota loki
- Tätä vanhemmat valmiit työt poistetaan, kun Chronos käynnistyyTuo kuvia kortilta tai kansiosta; tuonnit, analyysit ja renderöinnit näkyvät sitten täälläNosta prioriteettia: työ suoritetaan ennen alemman prioriteetin töitäAvaa kohde, jota tämä työ käsitteli
@@ -580,7 +579,6 @@
Versio, koontiversio, järjestelmä, lisenssi, kolmannen osapuolen koodiKannettava tila, lokit, diagnostiikka, tietokannan varmuuskopiointi ja palautus, oletusasetuksetAnalyysin leveys, yö- ja tähtirajat, syväanalyysi
- Arkistokansio, nimeämismallit, proxyjen ja pikkukuvien koko, uudelleenskannauksetMikä dekooderi käsittelee kunkin tiedostomuodon tällä tietokoneella, koodekkien asennuslinkitKieli, teema, käynnistys, ilmoituksetIstuntosäännöt, tarkistus, kaksoiskappaleet, tuonnin jälkeiset toiminnot
@@ -591,7 +589,6 @@
Kuvat, jotka käynnissä oleva työ käsittelee samanaikaisesti; työt suoritetaan yksi kerrallaan. Pienempi määrä jättää enemmän tilaa muille ohjelmille · Enter ottaa käyttöön, Esc palauttaaAutomaattinen: puolet loogisista ytimistäPalauta automaattinen: puolet loogisista ytimistä
- Kuinka usein Chronos skannaa arkiston uudelleen muualla (esimerkiksi arkistoa jakavalla palvelimella) tehtyjen muutosten varaltaKäytössä, kun portable.txt on Chronos.exe-tiedoston vieressä: kaikki tiedot pysyvät sen datakansiossaKäytä laitteistokooderia, kun jokin tukee esiasetusta; muuten ohjelmistoaNäillä malleilla tehdyn esimerkkituonnin kolme ensimmäistä nimeä
diff --git a/i18n/fr/Settings.fr.resx b/i18n/fr/Settings.fr.resx
index 9220d7cb..29f5f196 100644
--- a/i18n/fr/Settings.fr.resx
+++ b/i18n/fr/Settings.fr.resx
@@ -56,7 +56,6 @@
AucunLes paramètres de l'archive n'ont pas été enregistrésChoisir le dossier de l'archive
- Rescanner toutes lesAperçuTaille des proxysRéinitialiser l'archive
diff --git a/i18n/fr/Tooltips.fr.resx b/i18n/fr/Tooltips.fr.resx
index 55142294..2acfd43c 100644
--- a/i18n/fr/Tooltips.fr.resx
+++ b/i18n/fr/Tooltips.fr.resx
@@ -339,7 +339,6 @@
En cours d'exécution ou en pauseAfficher le dossier dans l'ExplorateurMasquer le journal
- Les tâches terminées plus anciennes sont supprimées au démarrage de ChronosImporter des photos depuis une carte ou un dossier ; les importations, analyses et rendus s'affichent ensuite iciAugmenter la priorité : la tâche passe avant celles de priorité inférieureOuvrir l'élément traité par cette tâche
@@ -580,7 +579,6 @@
Version, build, système, licence, code tiersMode portable, journaux, diagnostic, sauvegarde et restauration de la base de données, réinitialisationLargeur d'analyse, seuils de nuit et d'étoiles, analyse approfondie
- Dossier de l'archive, modèles de nommage, taille des proxys et des miniatures, nouveaux scansDécodeur utilisé pour chaque format sur ce PC, liens d'installation des codecsLangue, thème, démarrage, notificationsRègles de session, vérification, doublons, actions après l'importation
@@ -591,7 +589,6 @@
Photos traitées simultanément par la tâche en cours ; les tâches s'exécutent une par une. Une valeur plus faible laisse plus de place aux autres programmes · Enter pour appliquer, Esc pour rétablirAuto : la moitié des cœurs logiquesRevenir à Auto : la moitié des cœurs logiques
- Fréquence à laquelle Chronos rescanne l'archive pour détecter les modifications faites ailleurs, par exemple par un serveur qui la partageActivé quand portable.txt se trouve à côté de Chronos.exe : toutes les données restent dans son dossier de donnéesUtiliser un encodeur matériel s'il prend en charge le préréglage, sinon l'encodeur logicielTrois premiers noms d'un exemple d'importation avec ces modèles
diff --git a/i18n/he/Settings.he.resx b/i18n/he/Settings.he.resx
index a3a69d50..9a70f45c 100644
--- a/i18n/he/Settings.he.resx
+++ b/i18n/he/Settings.he.resx
@@ -56,7 +56,6 @@
ללא פרוקסיהגדרות הארכיון לא נשמרובחירת תיקיית הארכיון
- סריקה מחדש כלתצוגה מקדימהגודל פרוקסיאפס ארכיון
diff --git a/i18n/he/Tooltips.he.resx b/i18n/he/Tooltips.he.resx
index 21cef851..dfbe813e 100644
--- a/i18n/he/Tooltips.he.resx
+++ b/i18n/he/Tooltips.he.resx
@@ -341,7 +341,6 @@
משימות שפועלות כעת או מושהותהצגת התיקייה בסייר הקבציםהסתרת היומן
- משימות שהסתיימו וישנות יותר מכך יוסרו בעת הפעלת Chronosהבאת תמונות מכרטיס או מתיקייה; ייבואים, ניתוחים ורינדורים יופיעו כאןהעלאת העדיפות: המשימה תפעל לפני משימות בעדיפות נמוכה יותרפתיחת הפריט שהמשימה עבדה עליו
@@ -598,7 +597,6 @@
גרסה, גרסת Build, מערכת, רישיון, קוד צד שלישימצב נייד, יומנים, אבחון, גיבוי ושחזור של מסד הנתונים, איפוסרוחב ניתוח, ספי לילה וכוכבים, ניתוח מעמיק
- תיקיית הארכיון, תבניות שמות, גודל פרוקסי ותמונות ממוזערות, סריקות חוזרותאיזה מפענח מטפל בכל פורמט במחשב הזה, קישורים להתקנת קודקיםשפה, ערכת נושא, הפעלה, הודעותכללי סשנים, אימות, כפילויות, פעולות אחרי ייבוא
@@ -609,7 +607,6 @@
מספר התמונות שהמשימה הפועלת מעבדת בו-זמנית; המשימות פועלות אחת בכל פעם. מספר קטן יותר משאיר יותר מקום לתוכניות אחרות · Enter מחיל, Esc מבטלאוטומטי: מחצית מהליבות הלוגיותחזרה לאוטומטי: מחצית מהליבות הלוגיות
- באיזו תדירות Chronos סורק מחדש את הארכיון לאיתור שינויים שנעשו במקום אחר, למשל על ידי שרת שמשתף אותופעיל כאשר portable.txt נמצא לצד Chronos.exe: כל הנתונים נשמרים בתיקיית הנתונים שלושימוש במקודד חומרה כאשר יש כזה שתומך בפריסט; אחרת, קידוד בתוכנהשלושת השמות הראשונים בייבוא לדוגמה עם התבניות האלה
diff --git a/i18n/hi/Settings.hi.resx b/i18n/hi/Settings.hi.resx
index a26068bc..f5e43a1e 100644
--- a/i18n/hi/Settings.hi.resx
+++ b/i18n/hi/Settings.hi.resx
@@ -56,7 +56,6 @@
कोई नहींसंग्रह सेटिंग्स सहेजी नहीं गईंसंग्रह फ़ोल्डर चुनें
- पुनः स्कैन अंतरालपूर्वावलोकनप्रॉक्सी आकारसंग्रह रीसेट करें
diff --git a/i18n/hi/Tooltips.hi.resx b/i18n/hi/Tooltips.hi.resx
index 1ff74900..7b3657df 100644
--- a/i18n/hi/Tooltips.hi.resx
+++ b/i18n/hi/Tooltips.hi.resx
@@ -339,7 +339,6 @@
अभी चल रहे या विराम परफ़ोल्डर को एक्सप्लोरर में दिखाएँलॉग छिपाएँ
- इससे पुराने पूर्ण कार्य Chronos शुरू होने पर हटा दिए जाते हैंकिसी कार्ड या फ़ोल्डर से फ़ोटो लाएँ; फिर आयात, विश्लेषण और रेंडर यहाँ दिखते हैंप्राथमिकता बढ़ाएँ: यह कम प्राथमिकता वाले कार्यों से पहले चलता हैइस कार्य ने जिस पर काम किया, उसे खोलें
@@ -580,7 +579,6 @@
संस्करण, बिल्ड, सिस्टम, लाइसेंस, तृतीय-पक्ष कोडपोर्टेबल मोड, लॉग, निदान, डेटाबेस बैकअप और पुनर्स्थापना, रीसेटविश्लेषण चौड़ाई, रात और तारों की सीमाएँ, गहन विश्लेषण
- संग्रह फ़ोल्डर, नामकरण टेम्पलेट, प्रॉक्सी और थंबनेल आकार, पुनः स्कैनइस PC पर हर फ़ॉर्मेट को कौन-सा डिकोडर संभालता है, कोडेक इंस्टॉल लिंकभाषा, थीम, स्टार्टअप, सूचनाएँसत्र नियम, सत्यापन, डुप्लिकेट, आयात के बाद की क्रियाएँ
@@ -591,7 +589,6 @@
चल रहा कार्य एक साथ कितनी फ़ोटो संसाधित करता है; कार्य एक-एक करके चलते हैं। कम होने पर अन्य प्रोग्रामों के लिए अधिक जगह बचती है · Enter से लागू, Esc से पूर्ववतऑटो: आधे तार्किक कोरऑटो पर लौटें: आधे तार्किक कोर
- Chronos कितनी बार संग्रह को कहीं और किए गए बदलावों के लिए फिर से स्कैन करता है, जैसे इसे साझा करने वाले किसी सर्वर द्वाराजब portable.txt, Chronos.exe के बगल में हो तब चालू: सारा डेटा उसके डेटा फ़ोल्डर में रहता हैजब कोई हार्डवेयर एनकोडर प्रीसेट को सपोर्ट करे तो उसका उपयोग करें; अन्यथा सॉफ़्टवेयरइन टेम्पलेट के साथ नमूना आयात के पहले तीन नाम
diff --git a/i18n/hr/Settings.hr.resx b/i18n/hr/Settings.hr.resx
index 95ae70ae..02362ce5 100644
--- a/i18n/hr/Settings.hr.resx
+++ b/i18n/hr/Settings.hr.resx
@@ -56,7 +56,6 @@
Bez proxy kopijaPostavke arhive nisu spremljeneOdaberite mapu arhive
- Interval ponovnog skeniranjaPretpregledVeličina proxy kopijaVrati zadano
diff --git a/i18n/hr/Tooltips.hr.resx b/i18n/hr/Tooltips.hr.resx
index 0f44bf75..54548379 100644
--- a/i18n/hr/Tooltips.hr.resx
+++ b/i18n/hr/Tooltips.hr.resx
@@ -341,7 +341,6 @@
Upravo se izvode ili su pauziraniPrikazuje mapu u Eksploreru za datotekeSkriva zapisnik
- Dovršeni zadaci stariji od ovoga uklanjaju se pri pokretanju programa ChronosUvozi fotografije s kartice ili iz mape; ovdje se zatim prikazuju uvozi, analize i renderiranjaPovisuje prioritet: zadatak se izvodi prije zadataka nižeg prioritetaOtvara ono na čemu je zadatak radio
@@ -598,7 +597,6 @@
Verzija, međuverzija, sustav, licenca, kôd trećih stranaPrijenosni način, zapisnici, dijagnostika, sigurnosna kopija i vraćanje baze podataka, zadane postavkeŠirina analize, pragovi za noć i zvijezde, dubinska analiza
- Mapa arhive, predlošci naziva, veličina proxy kopija i minijatura, ponovna skeniranjaKoji dekoder obrađuje pojedini format na ovom računalu, poveznice za instalaciju kodekaJezik, tema, pokretanje, obavijestiPravila serija, provjera, duplikati, radnje nakon uvoza
@@ -609,7 +607,6 @@
Broj fotografija koje zadatak u tijeku obrađuje odjednom; zadaci se izvode jedan po jedan. Manji broj ostavlja više prostora drugim programima · Enter primjenjuje, Esc vraćaAuto: polovica logičkih jezgriVraća na Auto: polovica logičkih jezgri
- Koliko često Chronos ponovno skenira arhivu radi promjena napravljenih drugdje, npr. s poslužitelja koji je dijeliUključeno kada se portable.txt nalazi pokraj datoteke Chronos.exe: svi podaci ostaju u njezinoj mapi dataUpotrebljava hardverski koder kada podržava preset; inače softverskiPrva tri naziva oglednog uvoza s ovim predlošcima
diff --git a/i18n/hu/Settings.hu.resx b/i18n/hu/Settings.hu.resx
index 2ca2690f..2deb9d1f 100644
--- a/i18n/hu/Settings.hu.resx
+++ b/i18n/hu/Settings.hu.resx
@@ -56,7 +56,6 @@
NincsAz archívum beállításainak mentése sikertelenArchívummappa kiválasztása
- Átvizsgálási időközElőnézetProxyméretArchívum alaphelyzetbe állítása
diff --git a/i18n/hu/Tooltips.hu.resx b/i18n/hu/Tooltips.hu.resx
index 9dab06aa..35b0caa2 100644
--- a/i18n/hu/Tooltips.hu.resx
+++ b/i18n/hu/Tooltips.hu.resx
@@ -339,7 +339,6 @@
Éppen fut vagy szüneteltetve vanMegjeleníti a mappát a FájlkezelőbenElrejti a naplót
- Az ennél régebbi befejezett feladatok a Chronos indításakor törlődnekFotók importálása kártyáról vagy mappából; az importálások, elemzések és renderelések ezután itt jelennek megMegemeli a prioritást: az alacsonyabb prioritású feladatok előtt futMegnyitja azt, amin a feladat dolgozott
@@ -580,7 +579,6 @@
Verzió, build, rendszer, licenc, külső kódHordozható mód, naplók, diagnosztika, az adatbázis biztonsági mentése és visszaállítása, alaphelyzetbe állításElemzési szélesség, éjszakai és csillagküszöb, részletes elemzés
- Archívummappa, elnevezési sablonok, proxy- és miniatűrméret, újbóli átvizsgálásMelyik dekóder kezeli az egyes formátumokat ezen a számítógépen, kodektelepítési hivatkozásokNyelv, téma, indítás, értesítésekSzakaszszabályok, ellenőrzés, duplikátumok, importálás utáni műveletek
@@ -591,7 +589,6 @@
Ennyi fotót dolgoz fel egyszerre a futó feladat; a feladatok egyenként futnak. A kisebb érték több erőforrást hagy a többi programnak · Enter: alkalmaz, Esc: visszavonAuto: a logikai magok feleVissza Auto értékre: a logikai magok fele
- Ilyen gyakran vizsgálja át újra a Chronos az archívumot, hogy észlelje a máshol (például egy azt közösen használó szerveren) végzett módosításokatBekapcsolva, ha a portable.txt a Chronos.exe mellett van: minden adat a saját data mappájában maradHardveres kódolót használ, ha valamelyik támogatja az előbeállítást; egyébként szoftverestEgy mintaimportálás első három neve ezekkel a sablonokkal
diff --git a/i18n/id/Settings.id.resx b/i18n/id/Settings.id.resx
index 08b62eb1..49d53f51 100644
--- a/i18n/id/Settings.id.resx
+++ b/i18n/id/Settings.id.resx
@@ -56,7 +56,6 @@
Tidak adaPengaturan arsip gagal disimpanPilih folder arsip
- Pindai ulang setiapPratinjauUkuran proksiReset arsip
diff --git a/i18n/id/Tooltips.id.resx b/i18n/id/Tooltips.id.resx
index 0a13aea5..a9ba9032 100644
--- a/i18n/id/Tooltips.id.resx
+++ b/i18n/id/Tooltips.id.resx
@@ -339,7 +339,6 @@
Sedang berjalan atau dijedaTampilkan folder di ExplorerSembunyikan log
- Tugas selesai yang lebih lama dari ini dihapus saat Chronos dimulaiImpor foto dari kartu atau folder; impor, analisis, dan render kemudian muncul di siniNaikkan prioritas: tugas ini berjalan sebelum tugas berprioritas lebih rendahBuka hal yang dikerjakan tugas ini
@@ -580,7 +579,6 @@
Versi, build, sistem, lisensi, kode pihak ketigaMode portabel, log, diagnostik, pencadangan dan pemulihan basis data, resetLebar analisis, ambang malam dan bintang, analisis mendalam
- Folder arsip, templat penamaan, ukuran proksi dan gambar mini, pindai ulangDekoder yang menangani setiap format di PC ini, tautan instalasi codecBahasa, tema, startup, pemberitahuanAturan sesi, verifikasi, duplikat, tindakan setelah impor
@@ -591,7 +589,6 @@
Jumlah foto yang diproses sekaligus oleh tugas yang sedang berjalan; tugas berjalan satu per satu. Makin sedikit, makin banyak ruang untuk program lain · Enter menerapkan, Esc membatalkanOtomatis: setengah dari inti logisKembali ke Otomatis: setengah dari inti logis
- Seberapa sering Chronos memindai ulang arsip untuk mencari perubahan yang dibuat di tempat lain, misalnya oleh server yang berbagi arsip iniAktif bila portable.txt berada di samping Chronos.exe: semua data tetap di folder data miliknyaGunakan encoder perangkat keras jika ada yang mendukung preset; jika tidak, gunakan perangkat lunakTiga nama pertama dari contoh impor dengan templat ini
diff --git a/i18n/it/Jobs.it.resx b/i18n/it/Jobs.it.resx
index c815449b..303205a8 100644
--- a/i18n/it/Jobs.it.resx
+++ b/i18n/it/Jobs.it.resx
@@ -24,6 +24,39 @@
OggettoDove{0} / {1}
+ Azione
+ Recupera
+ Ogni giorno
+ Giorno del mese
+ Giorni
+ giorni
+ Analisi approfondita
+ Solo rapporto
+ Attiva
+ Intervallo
+ Scansione completa
+ Modifica {0}
+ Ogni
+ Copie mantenute
+ Ogni mese
+ Nome
+ Più vecchie di
+ Al massimo
+ % delle sequenze
+ Priorità
+ Ricrea tutto
+ Non accettata
+ Ripeti
+ Salva
+ Non salvata
+ Passaggi
+ Ora
+ Unità
+ giorni
+ ore
+ minuti
+ Non verificate da
+ Ogni settimanaNessuna attivitàTutte · {0}Concluse · {0}
@@ -32,6 +65,7 @@
In corso · {0}Cronologia di {0} giornoCronologia di {0} giorni
+ Cronologia completaAdozione cartellaCopia dell'indicePulizia
@@ -53,6 +87,9 @@
dopo {0}prossimaIn pausa per un'attività con priorità più alta ({0}); riprende da sola
+ Cache: {0} usati di {1}, niente da liberare
+ Cache non ridotta: la cartella non è una cartella cache di Chronos
+ Cache ridotta: {0} usati di {1}, liberati: {2}Ancora nessuna riga di logNascondi logMostra log
@@ -63,6 +100,73 @@
Impostazioni di rendering{0} · {1}{0}: {1}
+ Analisi
+ Copia dell'indice
+ Pulizia
+ Rapporto duplicati
+ Manutenzione
+ Rapporto file orfani
+ Proxy
+ Scansione archivio
+ Miniature
+ Verifica integrità
+ Azione
+ Ultimo esito
+ Nome
+ Prossima
+ Attiva
+ Quando
+ {0}, {1}
+ Elimina
+ Eliminare {0}?
+ La pianificazione si ferma per sempre; le attività che ha messo in coda restano nella cronologia.
+ Modifica
+ Attiva
+ Pianificazione non modificata
+ Attività nascosta
+ Mantieni
+ Ultima esecuzione {0}
+ Nuova pianificazione
+ Ancora nessuna esecuzione
+ Pianificazioni non attive
+ Disattivata
+ non riuscita
+ mai eseguita
+ in coda
+ niente da fare
+ saltata: non in linea
+ saltata: occupata
+ non disponibile
+ In background
+ Normale
+ Alta
+ Ripristina
+ Ripristinare {0}?
+ Ricorrenza, parametri e opzioni tornano ai valori predefiniti di questo PC; la cronologia resta.
+ Esegui ora
+ Ultime esecuzioni
+ Mostra in coda
+ Registro di controllo
+ Riduzione cache
+ Cronologia attività
+ Rapporto cestino
+ Scansione archivio
+ Pulizia periodica
+ Copia dell'indice
+ Oggi {0}
+ Domani {0}
+ Ogni giorno alle {0}
+ Ogni giorno
+ Ogni {0} giorni
+ Ogni ora
+ Ogni {0} ore
+ Ricorrenza non valida
+ Ogni minuto
+ Ogni {0} minuti
+ Ogni mese il {0} alle {1}
+ {0} alle {1}
+ Ieri {0}
+ PianificataCerca oggetto o tipo{0}/s{0} fps
@@ -74,5 +178,8 @@
in codain corso{0} · {1}
+ Vista attività
+ Coda
+ Pianificatequesto PC
diff --git a/i18n/it/Settings.it.resx b/i18n/it/Settings.it.resx
index 5b02008e..6d65f2a1 100644
--- a/i18n/it/Settings.it.resx
+++ b/i18n/it/Settings.it.resx
@@ -72,7 +72,6 @@
NessunoLe impostazioni dell'archivio non sono state salvateScegli la cartella dell'archivio
- Riscansiona ogniAnteprimaDimensione proxyReimposta archivio
diff --git a/i18n/it/Tooltips.it.resx b/i18n/it/Tooltips.it.resx
index 94d72762..987f1e70 100644
--- a/i18n/it/Tooltips.it.resx
+++ b/i18n/it/Tooltips.it.resx
@@ -332,6 +332,40 @@
Una sequenza per formato di file per l'intera cartella, sottocartelle comprese se incluse; fotocamere e pause sono ignorateFerma questa attività; Riprova la continua più tardi dall'ultimo punto di ripresaNasconde le attività concluse dall'elenco; restano nella cronologia
+ Chiudi senza salvare
+ Un'esecuzione persa mentre Chronos era chiuso avviene una volta all'avvio
+ Crea la pianificazione
+ Giorno da 1 a 28, che ogni mese ha
+ Le sequenze che la scansione indicizza ricevono anche un'analisi approfondita
+ Un'analisi approfondita delle sequenze che non ne hanno una, invece di una rapida
+ Elenca cosa farebbe la manutenzione senza cambiare niente
+ Disattivata, la pianificazione non viene mai eseguita da sola
+ Quanti minuti (da 5 a 1.440), ore (da 1 a 168) o giorni (da 1 a 366)
+ Rilegge ogni file, non solo quelli con data o dimensione cambiate
+ Quante copie dell'indice vengono mantenute; le più vecchie vengono eliminate
+ Ogni giorno a un'ora
+ A intervallo fisso: ogni n minuti, ore o giorni
+ In un giorno del mese a un'ora
+ In alcuni giorni della settimana a un'ora
+ Mostrato nella lista delle pianificazioni
+ Al massimo {0} caratteri
+ Dai un nome alla pianificazione
+ Scegli almeno un giorno
+ Scegli almeno un passaggio
+ Un numero intero da {0} a {1}
+ Rimuove le voci più vecchie di questi giorni; 0 conserva tutto
+ Al massimo questa parte delle sequenze dell'archivio per esecuzione, prima quelle verificate da più tempo
+ Le attività in background aspettano le altre; quelle Alta passano prima delle normali
+ Le ricrea per ogni sequenza, non solo per quelle che non le hanno
+ Chronos non ha accettato questa pianificazione (campo {0})
+ Salva le modifiche
+ Una pianificazione di sistema mantiene la sua azione
+ Una pianificazione di sistema mantiene il suo nome
+ Ora del giorno sull'orologio di questo PC, in ore e minuti (03:00)
+ Un'ora del giorno in ore e minuti, come 03:00
+ Minuti, ore o giorni
+ Solo le sequenze non verificate da questi giorni; 0 controlla qualsiasi
+ Quando viene eseguita, come la mostra la listaTutte le attivitàAttività concluseFermate per un errore o annullate
@@ -339,7 +373,7 @@
In esecuzione o in pausaMostra la cartella in Esplora fileNasconde il log
- Le attività concluse più vecchie vengono rimosse all'avvio di Chronos
+ Le attività concluse più vecchie di così vengono rimosse dalla pianificazione Pulizia periodica (scheda Pianificate)Porta dentro le foto da una scheda o da una cartella; importazioni, analisi e rendering compaiono poi quiAlza la priorità: verrà eseguita prima delle attività a priorità più bassaApre l'oggetto di questa attività
@@ -352,6 +386,54 @@
Parallelismo, preferenza hardware, memoria disponibileRimette l'attività in coda; riparte dal suo punto di ripresaEsegue di nuovo dall'ultimo punto di ripresa
+ Analizza le sequenze senza un'analisi aggiornata
+ Copia l'indice nella cartella dei backup e mantiene le copie più recenti
+ Rimuove ciò che a Chronos non serve più, come la vecchia cronologia attività; mai le tue foto
+ Elenca le foto duplicate nel log dell'attività
+ Esegue la manutenzione dell'archivio; Solo rapporto elenca cosa farebbe
+ Elenca nel log dell'attività dove indice e disco non coincidono
+ Crea i proxy delle sequenze che non li hanno
+ Scansione incrementale dell'archivio per le modifiche fatte altrove
+ Crea le miniature delle sequenze che non le hanno
+ Controlla gli hash degli originali, prima quelli verificati da più tempo
+ Un'esecuzione persa mentre Chronos era chiuso viene saltata
+ Un'esecuzione persa mentre Chronos era chiuso avviene all'avvio
+ Elimina questa pianificazione; le attività che ha messo in coda restano nella cronologia
+ Cambia quando viene eseguita e le sue opzioni
+ Disattivata: non viene mai eseguita da sola · fai clic per attivarla
+ Attiva: viene eseguita da sola · fai clic per disattivarla (Esegui ora funziona comunque)
+ Cancella concluse la nasconde dalla coda; resta nella cronologia
+ Mantieni la pianificazione
+ Mantieni le tue modifiche
+ Crea una pianificazione: un'azione, quando viene eseguita e le sue opzioni
+ Prossima esecuzione {0}
+ Disattivata: viene eseguita solo con Esegui ora
+ La prossima esecuzione viene calcolata al prossimo controllo
+ Le pianificazioni partono quando l'indice è aperto; il log dice perché non sono partite
+ L'esecuzione non ha potuto mettere in coda le sue attività: {0}
+ Non ancora eseguita
+ Le sue attività sono state messe in coda
+ Non restava niente da fare
+ Saltata: l'archivio era non in linea, scollegato o di sola lettura
+ Saltata: l'esecuzione precedente, o lo stesso lavoro, era ancora in attesa o in corso
+ Questo PC non può eseguire quest'azione
+ Le sue attività hanno priorità {0}
+ Riporta questa pianificazione ai valori predefiniti di questo PC; chiede prima
+ Eseguila una volta ora, come la prossima esecuzione; la prossima esecuzione resta com'è
+ Quando l'esecuzione ha messo in coda l'attività
+ Le attività che questa pianificazione ha messo in coda, dalla più recente
+ Mostra questa attività nella coda con il suo log
+ Rimuove le voci del registro di controllo più vecchie del limite
+ Riduce la cache a Impostazioni › Archiviazione › Limite cache, prima i file più vecchi
+ Rimuove le attività concluse più vecchie del limite
+ Elenca le voci del cestino più vecchie del limite; non elimina niente
+ {0} è una pianificazione propria di questo PC: si può modificare, disattivare o ripristinare, non eliminare
+ Questo PC non ha un esecutore per quest'azione
+ L'indice non ha un file da copiare
+ Non disponibile su questo PC
+ L'indice è su PostgreSQL, che si copia con i propri strumenti
+ L'archivio non crea proxy (Impostazioni › Archivio › Proxy)
+ Messa in coda da una pianificazione (scheda Pianificate)Filtra per oggetto o tipo mentre scriviApre l'oggetto dell'attività per vedere il problemaMostra le ultime righe del log
@@ -361,6 +443,8 @@
Riprendi continua dal punto di ripresaAttende il suo turno su questo PCL'avanzamento viene salvato a ogni punto di ripresa
+ Attività in attesa, in corso e concluse
+ Attività ricorrenti che questo PC mette in coda da solo: scansioni, copie, verifiche e pulizieIndicizza le foto che hai già, dove si trovano; scegli la loro cartella principaleAnalisi approfondita di ogni fotogramma · viene eseguita come attività in backgroundAnalisi approfondita delle sequenze selezionate · un'unica attività
@@ -585,7 +669,7 @@
Versione, build, sistema, licenza, codice di terze partiModalità portatile, log, diagnostica, backup e ripristino del database, valori predefinitiLarghezza di analisi, soglie di notte e stelle, analisi profonda
- Cartella dell'archivio, modelli dei nomi, dimensione di proxy e miniature, riscansioni
+ Cartella archivio, modelli di nome, dimensione di proxy e miniatureQuale decodificatore legge ogni formato su questo PC, link per installare i codecLingua, tema, avvio, notificheRegole delle sessioni, verifica, duplicati, azioni dopo l'importazione
@@ -596,7 +680,6 @@
Foto che l'attività in corso elabora insieme; le attività girano una alla volta. Meno lasciano più spazio agli altri programmi · Invio applica, Esc annullaAuto: metà dei core logiciTorna ad Auto: metà dei core logici
- Ogni quanto Chronos riscansiona l'archivio per le modifiche fatte altrove, per esempio da un server che lo condivideAttiva quando portable.txt si trova accanto a Chronos.exe: tutti i dati restano nella sua cartella dataUsa un encoder hardware quando supporta il preset; altrimenti il softwareI primi tre nomi di un'importazione di esempio con questi modelli
diff --git a/i18n/ja/Settings.ja.resx b/i18n/ja/Settings.ja.resx
index 604fa9f9..ea938f3d 100644
--- a/i18n/ja/Settings.ja.resx
+++ b/i18n/ja/Settings.ja.resx
@@ -56,7 +56,6 @@
なしアーカイブの設定を保存できませんでしたアーカイブフォルダーの選択
- 再スキャンの間隔プレビュープロキシのサイズアーカイブをリセット
diff --git a/i18n/ja/Tooltips.ja.resx b/i18n/ja/Tooltips.ja.resx
index 8d462a07..bcacdcb1 100644
--- a/i18n/ja/Tooltips.ja.resx
+++ b/i18n/ja/Tooltips.ja.resx
@@ -339,7 +339,6 @@
実行中または一時停止中のジョブエクスプローラーでフォルダーを表示します。ログを非表示にします。
- これより古い完了済みのジョブは、Chronos の起動時に削除されます。カードまたはフォルダーから写真を取り込みます。その後、インポート、分析、レンダリングがここに表示されます。優先度を上げます。優先度の低いジョブより先に実行されます。このジョブの対象を開きます。
@@ -580,7 +579,6 @@
バージョン、ビルド、システム、ライセンス、サードパーティコードポータブルモード、ログ、診断、データベースのバックアップと復元、リセット分析の幅、夜と星のしきい値、詳細分析
- アーカイブフォルダー、名前のテンプレート、プロキシとサムネイルのサイズ、再スキャンこの PC で各形式を処理するデコーダー、コーデックのインストールリンク言語、テーマ、スタートアップ、通知セッションのルール、検証、重複、インポート後の操作
@@ -591,7 +589,6 @@
実行中のジョブが同時に処理する写真の枚数です。ジョブは 1 件ずつ実行されます。少ないほど他のプログラムに余裕ができます · Enter で適用、Esc で元に戻す自動: 論理コア数の半分自動に戻す: 論理コア数の半分
- 他の場所 (アーカイブを共有するサーバーなど) で行われた変更を確認するために、Chronos がアーカイブを再スキャンする間隔です。Chronos.exe と同じ場所に portable.txt があるとオンになります。すべてのデータはそのデータフォルダーに保存されます。プリセットに対応するハードウェアエンコーダーがあればそれを使用し、なければソフトウェアを使用します。これらのテンプレートでインポートした場合の、最初の 3 つの名前の例
diff --git a/i18n/ko/Settings.ko.resx b/i18n/ko/Settings.ko.resx
index fd3af35a..51b09d6c 100644
--- a/i18n/ko/Settings.ko.resx
+++ b/i18n/ko/Settings.ko.resx
@@ -56,7 +56,6 @@
없음아카이브 설정을 저장하지 못했습니다아카이브 폴더 선택
- 다시 스캔 간격미리 보기프록시 크기아카이브 설정 초기화
diff --git a/i18n/ko/Tooltips.ko.resx b/i18n/ko/Tooltips.ko.resx
index c8305a0d..bd0bae9c 100644
--- a/i18n/ko/Tooltips.ko.resx
+++ b/i18n/ko/Tooltips.ko.resx
@@ -339,7 +339,6 @@
실행 중이거나 일시 중지된 작업탐색기에서 폴더를 표시합니다.로그를 숨깁니다.
- 이보다 오래된 완료 작업은 Chronos를 시작할 때 제거됩니다.카드나 폴더에서 사진을 가져옵니다. 가져오기, 분석, 렌더링 작업이 여기에 표시됩니다.우선순위를 높입니다. 우선순위가 낮은 작업보다 먼저 실행됩니다.이 작업의 대상을 엽니다.
@@ -580,7 +579,6 @@
버전, 빌드, 시스템, 라이선스, 타사 코드포터블 모드, 로그, 진단, 데이터베이스 백업 및 복원, 초기화분석 너비, 야간 및 별 임계값, 정밀 분석
- 아카이브 폴더, 이름 지정 템플릿, 프록시 및 썸네일 크기, 다시 스캔이 PC에서 각 형식을 처리하는 디코더, 코덱 설치 링크언어, 테마, 시작, 알림세션 규칙, 검증, 중복, 가져온 후 동작
@@ -591,7 +589,6 @@
실행 중인 작업이 동시에 처리하는 사진 수입니다. 작업은 한 번에 하나씩 실행됩니다. 적을수록 다른 프로그램에 여유가 생깁니다 · Enter로 적용, Esc로 되돌리기자동: 논리 코어 수의 절반자동으로 되돌리기: 논리 코어 수의 절반
- 다른 곳(예: 아카이브를 공유하는 서버)에서 변경한 내용을 찾기 위해 Chronos가 아카이브를 다시 스캔하는 간격입니다.Chronos.exe 옆에 portable.txt가 있으면 켜집니다. 모든 데이터가 해당 데이터 폴더에 보관됩니다.프리셋을 지원하는 하드웨어 인코더가 있으면 사용하고, 없으면 소프트웨어를 사용합니다.이 템플릿으로 가져올 때의 처음 세 이름 예시
diff --git a/i18n/lt/Settings.lt.resx b/i18n/lt/Settings.lt.resx
index e05db316..f2fd7cb5 100644
--- a/i18n/lt/Settings.lt.resx
+++ b/i18n/lt/Settings.lt.resx
@@ -56,7 +56,6 @@
NėraArchyvo parametrai neįrašytiPasirinkite archyvo aplanką
- Pakartotinio nuskaitymo intervalasPeržiūraTarpinių kopijų dydisAtkurti archyvo parametrus
diff --git a/i18n/lt/Tooltips.lt.resx b/i18n/lt/Tooltips.lt.resx
index d4122ea1..354656cb 100644
--- a/i18n/lt/Tooltips.lt.resx
+++ b/i18n/lt/Tooltips.lt.resx
@@ -341,7 +341,6 @@
Vykdomos dabar arba pristabdytosRodyti aplanką failų naršyklėjeSlėpti žurnalą
- Senesnės baigtos užduotys pašalinamos paleidžiant ChronosImportuoti nuotraukas iš kortelės ar aplanko; importavimo, analizės ir atvaizdavimo užduotys tada rodomos čiaPadidinti prioritetą: užduotis vykdoma prieš žemesnio prioriteto užduotisAtidaryti tai, ką apdorojo ši užduotis
@@ -598,7 +597,6 @@
Versija, kompiliacija, sistema, licencija, trečiųjų šalių kodasNešiojamasis režimas, žurnalai, diagnostika, duomenų bazės atsarginė kopija ir atkūrimas, numatytieji parametraiAnalizės plotis, nakties ir žvaigždžių slenksčiai, išsami analizė
- Archyvo aplankas, pavadinimų šablonai, tarpinių kopijų ir miniatiūrų dydis, pakartotinis nuskaitymasKuris iškoduotuvas apdoroja kiekvieną formatą šiame kompiuteryje, kodekų diegimo nuorodosKalba, tema, paleistis, pranešimaiSesijų taisyklės, patikra, dublikatai, veiksmai po importavimo
@@ -609,7 +607,6 @@
Kiek nuotraukų vykdoma užduotis apdoroja vienu metu; užduotys vykdomos po vieną. Kuo mažiau, tuo daugiau vietos kitoms programoms · Enter – taikyti, Esc – atšauktiAuto: pusė loginių branduoliųGrįžti į Auto: pusė loginių branduolių
- Kaip dažnai Chronos iš naujo nuskaito archyvą ieškant kitur atliktų pakeitimų, pvz., jį bendrai naudojančio serverioĮjungta, kai šalia Chronos.exe yra portable.txt: visi duomenys lieka programos duomenų aplankeNaudoti aparatinį koduotuvą, kai jis palaiko išankstinę nuostatą; kitu atveju – programinįPirmieji trys pavyzdinio importavimo pavadinimai pagal šiuos šablonus
diff --git a/i18n/lv/Settings.lv.resx b/i18n/lv/Settings.lv.resx
index c8387da9..ba121c68 100644
--- a/i18n/lv/Settings.lv.resx
+++ b/i18n/lv/Settings.lv.resx
@@ -56,7 +56,6 @@
NavArhīva iestatījumi netika saglabātiIzvēlieties arhīva mapi
- Pārskenēšanas intervālsPriekšskatījumsProxy izmērsAtiestatīt arhīva iestatījumus
diff --git a/i18n/lv/Tooltips.lv.resx b/i18n/lv/Tooltips.lv.resx
index ef328fab..2bddecbc 100644
--- a/i18n/lv/Tooltips.lv.resx
+++ b/i18n/lv/Tooltips.lv.resx
@@ -341,7 +341,6 @@
Darbojas tagad vai ir pauzētiRādīt mapi failu pārlūkāPaslēpt žurnālu
- Pabeigtie darbi, kas vecāki par šo, tiek noņemti, kad Chronos startēIenest fotoattēlus no kartes vai mapes; importēšanas, analīzes un renderēšanas darbi pēc tam parādās šeitPaaugstināt prioritāti: darbs tiek izpildīts pirms zemākas prioritātes darbiemAtvērt to, ar ko strādāja šis darbs
@@ -598,7 +597,6 @@
Versija, būvējums, sistēma, licence, trešo pušu kodsPortatīvais režīms, žurnāli, diagnostika, datu bāzes dublēšana un atjaunošana, atiestatīšanaAnalīzes platums, nakts un zvaigžņu sliekšņi, padziļinātā analīze
- Arhīva mape, nosaukumu veidnes, proxy attēlu un sīktēlu izmērs, pārskenēšanaKurš dekodētājs apstrādā katru formātu šajā datorā, kodeku instalēšanas saitesValoda, motīvs, startēšana, paziņojumiSesiju noteikumi, verificēšana, dublikāti, darbības pēc importēšanas
@@ -609,7 +607,6 @@
Fotoattēli, ko aktīvais darbs apstrādā vienlaikus; darbi tiek izpildīti pa vienam. Mazāks skaits atstāj vairāk vietas citām programmām · Enter piemēro, Esc atsaucAuto: puse no loģiskajiem kodoliemAtpakaļ uz Auto: puse no loģiskajiem kodoliem
- Cik bieži Chronos atkārtoti skenē arhīvu, meklējot izmaiņas, kas veiktas citur, piemēram, serverī, kas to koplietoIeslēgts, ja blakus Chronos.exe atrodas portable.txt: visi dati paliek tā datu mapēIzmantot aparatūras kodētāju, ja kāds atbalsta priekšiestatījumu; citādi programmatūrasPirmie trīs nosaukumi parauga importēšanai ar šīm veidnēm
diff --git a/i18n/ms/Settings.ms.resx b/i18n/ms/Settings.ms.resx
index 3b1c4056..5921d66f 100644
--- a/i18n/ms/Settings.ms.resx
+++ b/i18n/ms/Settings.ms.resx
@@ -56,7 +56,6 @@
TiadaTetapan arkib tidak disimpanPilih folder arkib
- Imbas semula setiapPratontonSaiz proksiTetapkan semula arkib
diff --git a/i18n/ms/Tooltips.ms.resx b/i18n/ms/Tooltips.ms.resx
index 2137271e..4ac273a8 100644
--- a/i18n/ms/Tooltips.ms.resx
+++ b/i18n/ms/Tooltips.ms.resx
@@ -339,7 +339,6 @@
Sedang berjalan atau dijedaTunjukkan folder dalam Penjelajah FailSembunyikan log
- Tugas selesai yang lebih lama daripada ini dialih keluar apabila Chronos bermulaBawa masuk foto daripada kad atau folder; import, analisis dan render kemudian dipaparkan di siniNaikkan keutamaan: tugas ini berjalan sebelum tugas yang berkeutamaan lebih rendahBuka perkara yang dikerjakan oleh tugas ini
@@ -580,7 +579,6 @@
Versi, binaan, sistem, lesen, kod pihak ketigaMod mudah alih, log, diagnostik, sandaran dan pemulihan pangkalan data, tetapkan semulaLebar analisis, ambang malam dan bintang, analisis mendalam
- Folder arkib, templat penamaan, saiz proksi dan lakaran kecil, imbasan semulaPenyahkod yang mengendalikan setiap format pada PC ini, pautan pemasangan kodekBahasa, tema, permulaan, pemberitahuanPeraturan sesi, pengesahan, pendua, tindakan selepas import
@@ -591,7 +589,6 @@
Bilangan foto yang diproses serentak oleh tugas yang sedang berjalan; tugas berjalan satu per satu. Lebih sedikit memberi lebih banyak ruang kepada program lain · Enter untuk menggunakan, Esc untuk membatalkanAuto: separuh daripada bilangan teras logikKembali ke Auto: separuh daripada bilangan teras logik
- Kekerapan Chronos mengimbas semula arkib untuk perubahan yang dibuat di tempat lain, contohnya oleh pelayan yang berkongsi arkib ituHidup apabila portable.txt terletak di sebelah Chronos.exe: semua data kekal dalam folder datanyaGunakan pengekod perkakasan apabila ada yang menyokong praset; jika tidak, gunakan perisianTiga nama pertama bagi contoh import dengan templat ini
diff --git a/i18n/nb/Settings.nb.resx b/i18n/nb/Settings.nb.resx
index 24465e06..92b1a2c7 100644
--- a/i18n/nb/Settings.nb.resx
+++ b/i18n/nb/Settings.nb.resx
@@ -56,7 +56,6 @@
IngenArkivinnstillingene ble ikke lagretVelg arkivmappen
- SkanneintervallForhåndsvisningProxystørrelseTilbakestill arkivet
diff --git a/i18n/nb/Tooltips.nb.resx b/i18n/nb/Tooltips.nb.resx
index 3a2db809..ea095b4a 100644
--- a/i18n/nb/Tooltips.nb.resx
+++ b/i18n/nb/Tooltips.nb.resx
@@ -339,7 +339,6 @@
Arbeider nå eller er satt på pauseVis mappen i FilutforskerSkjul loggen
- Fullførte jobber som er eldre enn dette, fjernes når Chronos starterHent inn bilder fra et kort eller en mappe; importjobber, analyser og renderinger vises deretter herØk prioriteten: jobben kjører før jobber med lavere prioritetÅpne det denne jobben arbeidet med
@@ -580,7 +579,6 @@
Versjon, bygg, system, lisens, tredjepartskodePortabel modus, logger, diagnostikk, sikkerhetskopiering og gjenoppretting av databasen, tilbakestillingAnalysebredde, terskler for natt og stjerner, dybdeanalyse
- Arkivmappe, navnemaler, størrelse på proxyer og miniatyrbilder, skanneintervallHvilken dekoder som leser hvert format på denne PC-en, lenker for å installere kodekerSpråk, tema, oppstart, varslerRegler for økter, verifisering, duplikater, handlinger etter import
@@ -591,7 +589,6 @@
Bilder som den kjørende jobben behandler samtidig; jobber kjører én om gangen. Færre gir mer plass til andre programmer · Enter tar i bruk, Esc angrerAuto: halvparten av de logiske kjerneneTilbake til Auto: halvparten av de logiske kjernene
- Hvor ofte Chronos skanner arkivet på nytt etter endringer gjort andre steder, for eksempel av en server som deler detPå når portable.txt ligger ved siden av Chronos.exe: alle data blir liggende i programmets egen datamappeBruk en maskinvarekoder når en støtter forhåndsinnstillingen, ellers programvareDe tre første navnene fra en eksempelimport med disse malene
diff --git a/i18n/nl/Settings.nl.resx b/i18n/nl/Settings.nl.resx
index 3fa60de7..ce012e05 100644
--- a/i18n/nl/Settings.nl.resx
+++ b/i18n/nl/Settings.nl.resx
@@ -56,7 +56,6 @@
GeenDe archiefinstellingen zijn niet opgeslagenKies de archiefmap
- Opnieuw scannen elkeVoorbeeldProxygrootteArchief herstellen
diff --git a/i18n/nl/Tooltips.nl.resx b/i18n/nl/Tooltips.nl.resx
index c5ea4d76..6a4249f2 100644
--- a/i18n/nl/Tooltips.nl.resx
+++ b/i18n/nl/Tooltips.nl.resx
@@ -339,7 +339,6 @@
Nu bezig of onderbrokenToon de map in VerkennerVerberg het logboek
- Voltooide taken die ouder zijn dan dit, worden verwijderd wanneer Chronos startHaal foto's binnen van een kaart of uit een map; imports, analyses en renders verschijnen daarna hierVerhoog de prioriteit: de taak wordt uitgevoerd vóór taken met een lagere prioriteitOpen waaraan deze taak heeft gewerkt
@@ -580,7 +579,6 @@
Versie, build, systeem, licentie, code van derdenDraagbare modus, logboeken, diagnose, back-up en terugzetten van de database, herstellenAnalysebreedte, drempels voor nacht en sterren, diepgaande analyse
- Archiefmap, naamsjablonen, proxy- en miniatuurgrootte, opnieuw scannenWelke decoder elke indeling op deze pc verwerkt, links om codecs te installerenTaal, thema, opstarten, meldingenSessieregels, verificatie, duplicaten, acties na import
@@ -591,7 +589,6 @@
Foto's die de lopende taak tegelijk verwerkt; taken worden één voor één uitgevoerd. Minder laat meer ruimte voor andere programma's · Enter past toe, Esc maakt ongedaanAuto: de helft van de logische kernenTerug naar Auto: de helft van de logische kernen
- Hoe vaak Chronos het archief opnieuw scant op wijzigingen die elders zijn aangebracht, bijvoorbeeld door een server die het deeltAan wanneer portable.txt naast Chronos.exe staat: alle gegevens blijven in de bijbehorende gegevensmapGebruik een hardware-encoder als die de voorinstelling ondersteunt; anders softwareEerste drie namen van een voorbeeldimport met deze sjablonen
diff --git a/i18n/pl/Settings.pl.resx b/i18n/pl/Settings.pl.resx
index 7e099b83..2325688a 100644
--- a/i18n/pl/Settings.pl.resx
+++ b/i18n/pl/Settings.pl.resx
@@ -56,7 +56,6 @@
BrakNie zapisano ustawień archiwumWybierz folder archiwum
- Skanuj ponownie coPodglądRozmiar proxyResetuj archiwum
diff --git a/i18n/pl/Tooltips.pl.resx b/i18n/pl/Tooltips.pl.resx
index 96a6a3ef..ecf24643 100644
--- a/i18n/pl/Tooltips.pl.resx
+++ b/i18n/pl/Tooltips.pl.resx
@@ -343,7 +343,6 @@
Wykonywane teraz lub wstrzymanePokaż folder w EksploratorzeUkryj dziennik
- Zakończone zadania starsze niż ten okres są usuwane przy uruchomieniu programu ChronosZaimportuj zdjęcia z karty lub folderu; zadania importu, analizy i renderowania pojawią się potem tutajPodnieś priorytet: zadanie zostanie uruchomione przed zadaniami o niższym priorytecieOtwórz element, na którym działało to zadanie
@@ -616,7 +615,6 @@
Wersja, kompilacja, system, licencja, kod innych firmTryb przenośny, dzienniki, diagnostyka, kopia zapasowa i przywracanie bazy danych, resetowanieSzerokość analizy, progi nocy i gwiazd, dogłębna analiza
- Folder archiwum, szablony nazw, rozmiar proxy i miniatur, ponowne skanowanieKtóry dekoder obsługuje każdy format na tym komputerze, linki do instalacji kodekówJęzyk, motyw, uruchamianie, powiadomieniaReguły sesji, weryfikacja, duplikaty, działania po imporcie
@@ -627,7 +625,6 @@
Liczba zdjęć przetwarzanych naraz przez wykonywane zadanie; zadania są wykonywane po jednym. Mniejsza wartość zostawia więcej zasobów innym programom · Enter stosuje, Esc przywracaAuto: połowa rdzeni logicznychPrzywróć Auto: połowa rdzeni logicznych
- Jak często Chronos ponownie skanuje archiwum w poszukiwaniu zmian wprowadzonych gdzie indziej, np. przez serwer, który je współdzieliWłączony, gdy obok Chronos.exe znajduje się plik portable.txt: wszystkie dane pozostają w jego folderze danychUżywaj enkodera sprzętowego, jeśli obsługuje on preset; w przeciwnym razie programowegoPierwsze trzy nazwy przykładowego importu z tymi szablonami
diff --git a/i18n/pt-BR/Settings.pt-BR.resx b/i18n/pt-BR/Settings.pt-BR.resx
index d37ba2a3..b93f1239 100644
--- a/i18n/pt-BR/Settings.pt-BR.resx
+++ b/i18n/pt-BR/Settings.pt-BR.resx
@@ -56,7 +56,6 @@
NenhumAs configurações do acervo não foram salvasEscolha a pasta do acervo
- Examinar de novo a cadaPréviaTamanho do proxyRedefinir acervo
diff --git a/i18n/pt-BR/Tooltips.pt-BR.resx b/i18n/pt-BR/Tooltips.pt-BR.resx
index 414875d2..822c89f3 100644
--- a/i18n/pt-BR/Tooltips.pt-BR.resx
+++ b/i18n/pt-BR/Tooltips.pt-BR.resx
@@ -339,7 +339,6 @@
Em execução ou pausadasMostra a pasta no Explorador de ArquivosOculta o log
- Tarefas concluídas mais antigas que isso são removidas quando o Chronos iniciaImporta fotos de um cartão ou de uma pasta; importações, análises e renderizações aparecem aqui depoisAumenta a prioridade: a tarefa é executada antes das de prioridade mais baixaAbre o que esta tarefa processou
@@ -580,7 +579,6 @@
Versão, compilação, sistema, licença, código de terceirosModo portátil, logs, diagnóstico, backup e restauração do banco de dados, redefiniçãoLargura da análise, limites de noite e de estrelas, análise aprofundada
- Pasta do acervo, modelos de nomes, tamanho do proxy e das miniaturas, varreduras periódicasQual decodificador lê cada formato neste PC, links para instalar codecsIdioma, tema, inicialização, notificaçõesRegras de sessão, verificação, duplicatas, ações após a importação
@@ -591,7 +589,6 @@
Fotos que a tarefa em execução processa ao mesmo tempo; as tarefas são executadas uma por vez. Menos deixa mais espaço para outros programas · Enter aplica, Esc reverteAuto: metade dos núcleos lógicosVolta para Auto: metade dos núcleos lógicos
- Com que frequência o Chronos examina o acervo de novo em busca de alterações feitas em outro lugar, por exemplo por um servidor que o compartilhaAtivado quando portable.txt está ao lado de Chronos.exe: todos os dados ficam na pasta data deleUsa um codificador de hardware quando algum suporta a predefinição; caso contrário, softwareOs três primeiros nomes de uma importação de exemplo com estes modelos
diff --git a/i18n/pt-PT/Settings.pt-PT.resx b/i18n/pt-PT/Settings.pt-PT.resx
index 23769dc5..3059fd96 100644
--- a/i18n/pt-PT/Settings.pt-PT.resx
+++ b/i18n/pt-PT/Settings.pt-PT.resx
@@ -56,7 +56,6 @@
NenhumAs definições do arquivo não foram guardadasEscolher a pasta do arquivo
- Intervalo entre examesPré-visualizaçãoTamanho do proxyRepor arquivo
diff --git a/i18n/pt-PT/Tooltips.pt-PT.resx b/i18n/pt-PT/Tooltips.pt-PT.resx
index 6855e123..30b1db81 100644
--- a/i18n/pt-PT/Tooltips.pt-PT.resx
+++ b/i18n/pt-PT/Tooltips.pt-PT.resx
@@ -339,7 +339,6 @@
Em curso ou em pausaMostrar a pasta no Explorador de FicheirosOcultar o registo
- As tarefas terminadas mais antigas do que isto são removidas quando o Chronos iniciaImportar fotografias de um cartão ou de uma pasta; as importações, as análises e as renderizações aparecem depois aquiAumentar a prioridade: é executada antes das tarefas de prioridade inferiorAbrir aquilo em que esta tarefa trabalhou
@@ -580,7 +579,6 @@
Versão, compilação, sistema, licença, código de terceirosModo portátil, registos, diagnóstico, cópia de segurança e restauro da base de dados, reposiçãoLargura de análise, limiares de noite e de estrelas, análise aprofundada
- Pasta do arquivo, modelos de nomes, tamanho dos proxies e das miniaturas, exames periódicosQue descodificador trata cada formato neste PC, ligações para instalar codecsIdioma, tema, arranque, notificaçõesRegras de sessão, verificação, duplicados, ações após a importação
@@ -591,7 +589,6 @@
Fotografias que a tarefa em curso processa em simultâneo; as tarefas são executadas uma de cada vez. Menos deixam mais espaço a outros programas · Enter aplica, Esc reverteAuto: metade dos núcleos lógicosVoltar a Auto: metade dos núcleos lógicos
- Com que frequência o Chronos examina de novo o arquivo à procura de alterações feitas noutro local, por exemplo por um servidor que o partilhaAtivado quando o portable.txt está junto ao Chronos.exe: todos os dados ficam na respetiva pasta de dadosUtilizar um codificador de hardware quando algum suporta a predefinição; caso contrário, softwareOs três primeiros nomes de uma importação de exemplo com estes modelos
diff --git a/i18n/ro/Settings.ro.resx b/i18n/ro/Settings.ro.resx
index 724ee0dd..71f0ef00 100644
--- a/i18n/ro/Settings.ro.resx
+++ b/i18n/ro/Settings.ro.resx
@@ -56,7 +56,6 @@
Fără proxy-uriSetările arhivei nu au fost salvateAlegeți folderul arhivei
- Interval de rescanarePrevizualizareDimensiune proxyResetare arhivă
diff --git a/i18n/ro/Tooltips.ro.resx b/i18n/ro/Tooltips.ro.resx
index 89b31056..baf2c676 100644
--- a/i18n/ro/Tooltips.ro.resx
+++ b/i18n/ro/Tooltips.ro.resx
@@ -341,7 +341,6 @@
Rulează acum sau sunt în pauzăAfișați folderul în ExplorerAscundeți jurnalul
- Lucrările finalizate mai vechi de atât sunt eliminate la pornirea ChronosAduceți fotografii de pe un card sau dintr-un folder; importurile, analizele și randările apar apoi aiciCreșteți prioritatea: lucrarea rulează înaintea lucrărilor cu prioritate mai micăDeschideți obiectul acestei lucrări
@@ -598,7 +597,6 @@
Versiune, build, sistem, licență, cod terțMod portabil, jurnale, diagnosticare, copie de rezervă și restaurare a bazei de date, resetareLățime de analiză, praguri pentru noapte și stele, analiză aprofundată
- Folderul arhivei, șabloane de denumire, dimensiunea proxy-urilor și a miniaturilor, rescanăriCe decodificator gestionează fiecare format pe acest PC, linkuri de instalare a codecurilorLimbă, temă, pornire, notificăriReguli pentru sesiuni, verificare, duplicate, acțiuni după import
@@ -609,7 +607,6 @@
Fotografiile pe care lucrarea în curs le procesează simultan; lucrările rulează pe rând. Mai puține lasă mai mult loc altor programe · Enter aplică, Esc anuleazăAuto: jumătate din nucleele logiceRevenire la Auto: jumătate din nucleele logice
- Cât de des rescanează Chronos arhiva pentru modificări făcute în altă parte, de exemplu de un server care o partajeazăActivat când portable.txt se află lângă Chronos.exe: toate datele rămân în folderul său de dateFolosiți un codificator hardware când acesta acceptă presetarea; altfel, softwarePrimele trei nume ale unui import de probă cu aceste șabloane
diff --git a/i18n/ru/Settings.ru.resx b/i18n/ru/Settings.ru.resx
index de4f33bc..e0a4d470 100644
--- a/i18n/ru/Settings.ru.resx
+++ b/i18n/ru/Settings.ru.resx
@@ -56,7 +56,6 @@
НетПараметры архива не сохраненыВыберите папку архива
- Пересканировать каждыеПредпросмотрРазмер проксиСбросить параметры
diff --git a/i18n/ru/Tooltips.ru.resx b/i18n/ru/Tooltips.ru.resx
index 8c0b0b8e..02ac0317 100644
--- a/i18n/ru/Tooltips.ru.resx
+++ b/i18n/ru/Tooltips.ru.resx
@@ -343,7 +343,6 @@
Выполняются сейчас или приостановленыПоказать папку в проводникеСкрыть журнал
- Завершённые задания старше этого срока удаляются при запуске ChronosИмпортировать фото с карты или из папки; затем здесь появятся задания импорта, анализа и рендерингаПовысить приоритет: задание выполнится раньше заданий с более низким приоритетомОткрыть то, с чем работало это задание
@@ -616,7 +615,6 @@
Версия, сборка, система, лицензия, сторонний кодПортативный режим, журналы, диагностика, резервное копирование и восстановление базы данных, сбросШирина анализа, пороги ночи и звёзд, глубокий анализ
- Папка архива, шаблоны имён, размер прокси и эскизов, пересканированиеКакой декодер обрабатывает каждый формат на этом ПК, ссылки для установки кодековЯзык, тема, автозапуск, уведомленияПравила сеансов, проверка, дубликаты, действия после импорта
@@ -627,7 +625,6 @@
Сколько фото выполняемое задание обрабатывает одновременно; задания выполняются по одному. Меньшее число оставляет больше ресурсов другим программам · Enter — применить, Esc — отменитьАвто: половина логических ядерВернуть «Авто»: половина логических ядер
- Как часто Chronos пересканирует архив в поисках изменений, сделанных в другом месте, например сервером, который тоже его используетВключён, если рядом с Chronos.exe лежит portable.txt: все данные хранятся в его папке данныхИспользовать аппаратный кодировщик, если он поддерживает пресет; иначе программныйПервые три имени примерного импорта с этими шаблонами
diff --git a/i18n/sk/Settings.sk.resx b/i18n/sk/Settings.sk.resx
index fbd01b1c..0d1cd8f5 100644
--- a/i18n/sk/Settings.sk.resx
+++ b/i18n/sk/Settings.sk.resx
@@ -56,7 +56,6 @@
Bez proxyNastavenia archívu sa neuložiliVyberte priečinok archívu
- Interval skenovaniaUkážkaVeľkosť proxyResetovať nastavenia
diff --git a/i18n/sk/Tooltips.sk.resx b/i18n/sk/Tooltips.sk.resx
index bb5c3ed1..16cf352b 100644
--- a/i18n/sk/Tooltips.sk.resx
+++ b/i18n/sk/Tooltips.sk.resx
@@ -341,7 +341,6 @@
Práve bežia alebo sú pozastavenéZobrazí priečinok v PrieskumníkoviSkryje denník
- Dokončené úlohy staršie ako toto obdobie sa pri spustení Chronos odstrániaPrenesie fotografie z karty alebo priečinka; importy, analýzy a renderovania sa potom zobrazia tuZvýši prioritu: úloha sa spustí pred úlohami s nižšou prioritouOtvorí to, na čom úloha pracovala
@@ -598,7 +597,6 @@
Verzia, zostava, systém, licencia, kód tretích stránPrenosný režim, denníky, diagnostika, záloha a obnovenie databázy, resetovanieŠírka analýzy, prahy pre noc a hviezdy, hĺbková analýza
- Priečinok archívu, šablóny názvov, veľkosť proxy a miniatúr, opätovné skenovanieKtorý dekodér spracúva jednotlivé formáty na tomto počítači, odkazy na inštaláciu kodekovJazyk, motív, spúšťanie, oznámeniaPravidlá sérií, overenie, duplikáty, akcie po importe
@@ -609,7 +607,6 @@
Počet fotografií, ktoré bežiaca úloha spracúva naraz; úlohy bežia jedna po druhej. Menší počet ponechá viac priestoru iným programom · Enter použije, Esc vráti späťAuto: polovica logických jadierSpäť na Auto: polovica logických jadier
- Ako často Chronos znova skenuje archív kvôli zmenám vykonaným inde, napríklad serverom, ktorý ho zdieľaZapnutý, keď je vedľa Chronos.exe súbor portable.txt: všetky údaje zostávajú v jeho priečinku údajovPoužije hardvérový kodér, ak niektorý podporuje predvoľbu; inak softvérovýPrvé tri názvy vzorového importu s týmito šablónami
diff --git a/i18n/sl/Settings.sl.resx b/i18n/sl/Settings.sl.resx
index 7eefc379..304e247a 100644
--- a/i18n/sl/Settings.sl.resx
+++ b/i18n/sl/Settings.sl.resx
@@ -56,7 +56,6 @@
BrezNastavitve arhiva niso bile shranjeneIzberite mapo arhiva
- Interval ponovnega pregledaPredogledVelikost proxyjevPonastavi nastavitve
diff --git a/i18n/sl/Tooltips.sl.resx b/i18n/sl/Tooltips.sl.resx
index ffb426fd..8f9c35f2 100644
--- a/i18n/sl/Tooltips.sl.resx
+++ b/i18n/sl/Tooltips.sl.resx
@@ -341,7 +341,6 @@
Se izvajajo ali so začasno ustavljenaPokaži mapo v RaziskovalcuSkrij dnevnik
- Končana opravila, starejša od tega, se odstranijo ob zagonu programa ChronosUvozi fotografije s kartice ali iz mape; opravila uvoza, analize in upodabljanja se nato prikažejo tukajZvišaj prednost: opravilo se izvede pred opravili z nižjo prednostjoOdpri, na čemer je delalo to opravilo
@@ -598,7 +597,6 @@
Različica, gradnja, sistem, licenca, koda tretjih osebPrenosni način, dnevniki, diagnostika, varnostno kopiranje in obnovitev zbirke podatkov, ponastavitevŠirina analize, pragova za noč in zvezde, poglobljena analiza
- Mapa arhiva, predloge za poimenovanje, velikost proxyjev in miniatur, ponovni preglediKateri dekodirnik obdela posamezen format v tem računalniku, povezave za namestitev kodekovJezik, tema, zagon, obvestilaPravila snemanj, preverjanje, dvojniki, dejanja po uvozu
@@ -609,7 +607,6 @@
Število fotografij, ki jih opravilo v teku obdeluje hkrati; opravila se izvajajo eno za drugim. Manj jih pusti več prostora drugim programom · Enter uveljavi, Esc razveljaviSamodejno: polovica logičnih jederNazaj na samodejno: polovica logičnih jeder
- Kako pogosto Chronos znova pregleda arhiv za spremembe, narejene drugje, na primer na strežniku, ki uporablja isti arhivVklopljeno, ko je portable.txt poleg Chronos.exe: vsi podatki ostanejo v njegovi mapi s podatkiUporabi strojni kodirnik, kadar podpira prednastavitev, sicer programskegaPrva tri imena vzorčnega uvoza s temi predlogami
diff --git a/i18n/sv/Settings.sv.resx b/i18n/sv/Settings.sv.resx
index e43e5cf2..dd846518 100644
--- a/i18n/sv/Settings.sv.resx
+++ b/i18n/sv/Settings.sv.resx
@@ -56,7 +56,6 @@
IngaArkivinställningarna sparades inteVälj arkivmappen
- GenomsökningsintervallFörhandsvisningProxystorlekÅterställ arkiv
diff --git a/i18n/sv/Tooltips.sv.resx b/i18n/sv/Tooltips.sv.resx
index 4edff878..3f8c3287 100644
--- a/i18n/sv/Tooltips.sv.resx
+++ b/i18n/sv/Tooltips.sv.resx
@@ -339,7 +339,6 @@
Arbetar nu eller pausadeVisa mappen i UtforskarenDölj loggen
- Slutförda jobb som är äldre än så tas bort när Chronos startarHämta in foton från ett kort eller en mapp; importer, analyser och renderingar visas sedan härHöj prioriteten: jobbet körs före jobb med lägre prioritetÖppna det som jobbet arbetade med
@@ -580,7 +579,6 @@
Version, bygge, system, licens, tredjepartskodPortabelt läge, loggar, diagnostik, säkerhetskopiering och återställning av databasen, återställning av inställningarAnalysbredd, tröskelvärden för natt och stjärnor, djupanalys
- Arkivmapp, namngivningsmallar, proxy- och miniatyrstorlek, genomsökningsintervallVilken avkodare som hanterar varje format på den här datorn, länkar för att installera codecsSpråk, tema, start, aviseringarSessionsregler, verifiering, dubbletter, åtgärder efter import
@@ -591,7 +589,6 @@
Foton som det pågående jobbet bearbetar samtidigt; jobb körs ett i taget. Färre lämnar mer utrymme åt andra program · Enter tillämpar, Esc återställerAuto: hälften av de logiska kärnornaTillbaka till Auto: hälften av de logiska kärnorna
- Hur ofta Chronos genomsöker arkivet igen efter ändringar som gjorts på annat håll, till exempel av en server som delar detPå när portable.txt ligger bredvid Chronos.exe: alla data stannar i dess datamappAnvänd en maskinvarukodare när någon stöder förinställningen; annars programvaraDe tre första namnen i en exempelimport med de här mallarna
diff --git a/i18n/th/Settings.th.resx b/i18n/th/Settings.th.resx
index 856914e0..e6a6ed45 100644
--- a/i18n/th/Settings.th.resx
+++ b/i18n/th/Settings.th.resx
@@ -56,7 +56,6 @@
ไม่มีไม่ได้บันทึกการตั้งค่าคลังภาพเลือกโฟลเดอร์คลังภาพ
- สแกนใหม่ทุกตัวอย่างขนาดพร็อกซีรีเซ็ตคลังภาพ
diff --git a/i18n/th/Tooltips.th.resx b/i18n/th/Tooltips.th.resx
index 8421963f..a2589333 100644
--- a/i18n/th/Tooltips.th.resx
+++ b/i18n/th/Tooltips.th.resx
@@ -339,7 +339,6 @@
กำลังทำงานหรือหยุดชั่วคราวแสดงโฟลเดอร์ในตัวสำรวจไฟล์ซ่อนบันทึก
- งานที่เสร็จแล้วซึ่งเก่ากว่านี้จะถูกลบเมื่อ Chronos เริ่มทำงานนำภาพเข้าจากการ์ดหรือโฟลเดอร์ จากนั้นการนำเข้า การวิเคราะห์ และการเรนเดอร์จะแสดงที่นี่เพิ่มลำดับความสำคัญ: งานนี้จะทำงานก่อนงานที่มีลำดับความสำคัญต่ำกว่าเปิดสิ่งที่งานนี้ดำเนินการ
@@ -580,7 +579,6 @@
เวอร์ชัน บิลด์ ระบบ สัญญาอนุญาต โค้ดของบุคคลที่สามโหมดพกพา บันทึกระบบ การวินิจฉัย การสำรองและกู้คืนฐานข้อมูล การรีเซ็ตความกว้างการวิเคราะห์ เกณฑ์กลางคืนและดาว การวิเคราะห์เชิงลึก
- โฟลเดอร์คลังภาพ เทมเพลตการตั้งชื่อ ขนาดพร็อกซีและภาพขนาดย่อ การสแกนใหม่ตัวถอดรหัสที่จัดการแต่ละรูปแบบไฟล์บนพีซีเครื่องนี้ ลิงก์ติดตั้งโคเดกภาษา ธีม การเริ่มต้น การแจ้งเตือนกฎการแบ่งรอบการถ่าย การตรวจสอบ ภาพซ้ำ การดำเนินการหลังนำเข้า
@@ -591,7 +589,6 @@
จำนวนภาพที่งานที่กำลังทำงานประมวลผลพร้อมกัน งานจะทำทีละงาน ค่าน้อยจะเหลือทรัพยากรให้โปรแกรมอื่นมากขึ้น · Enter เพื่อใช้ Esc เพื่อย้อนกลับอัตโนมัติ: ครึ่งหนึ่งของคอร์เชิงตรรกะกลับเป็นอัตโนมัติ: ครึ่งหนึ่งของคอร์เชิงตรรกะ
- ความถี่ที่ Chronos สแกนคลังภาพใหม่เพื่อหาการเปลี่ยนแปลงจากที่อื่น เช่น จากเซิร์ฟเวอร์ที่ใช้คลังภาพร่วมกันเปิดเมื่อมี portable.txt อยู่ข้าง Chronos.exe: ข้อมูลทั้งหมดจะอยู่ในโฟลเดอร์ข้อมูลของโปรแกรมใช้ตัวเข้ารหัสฮาร์ดแวร์เมื่อมีตัวที่รองรับพรีเซ็ต มิฉะนั้นใช้ซอฟต์แวร์สามชื่อแรกของการนำเข้าตัวอย่างด้วยเทมเพลตเหล่านี้
diff --git a/i18n/tr/Settings.tr.resx b/i18n/tr/Settings.tr.resx
index a254769e..6331f4e0 100644
--- a/i18n/tr/Settings.tr.resx
+++ b/i18n/tr/Settings.tr.resx
@@ -56,7 +56,6 @@
YokArşiv ayarları kaydedilmediArşiv klasörünü seçin
- Yeniden tarama aralığıÖnizlemeProxy boyutuArşivi sıfırla
diff --git a/i18n/tr/Tooltips.tr.resx b/i18n/tr/Tooltips.tr.resx
index 96e28473..df231198 100644
--- a/i18n/tr/Tooltips.tr.resx
+++ b/i18n/tr/Tooltips.tr.resx
@@ -339,7 +339,6 @@
Şu anda çalışıyor veya duraklatıldıKlasörü Dosya Gezgini'nde gösterirGünlüğü gizler
- Bundan eski biten görevler Chronos başlarken kaldırılırBir karttan veya klasörden fotoğraf içe aktarır; içe aktarmalar, analizler ve işlemeler ardından burada görünürÖnceliği yükseltir: görev, daha düşük öncelikli görevlerden önce çalışırBu görevin üzerinde çalıştığı öğeyi açar
@@ -580,7 +579,6 @@
Sürüm, derleme, sistem, lisans, üçüncü taraf koduTaşınabilir mod, günlükler, tanılama, veritabanı yedekleme ve geri yükleme, sıfırlamaAnaliz genişliği, gece ve yıldız eşikleri, ayrıntılı analiz
- Arşiv klasörü, ad şablonları, proxy ve küçük resim boyutu, yeniden taramalarBu bilgisayarda her biçimi hangi kod çözücünün işlediği, codec kurulum bağlantılarıDil, tema, başlangıç, bildirimlerOturum kuralları, doğrulama, yinelenenler, içe aktarma sonrası eylemler
@@ -591,7 +589,6 @@
Çalışan görevin aynı anda işlediği fotoğraf sayısı; görevler tek tek çalışır. Daha düşük değer diğer programlara daha fazla yer bırakır · Enter uygular, Esc geri alırOtomatik: mantıksal çekirdeklerin yarısıOtomatiğe dön: mantıksal çekirdeklerin yarısı
- Chronos'un, başka yerde (örneğin arşivi paylaşan bir sunucuda) yapılan değişiklikleri bulmak için arşivi ne sıklıkla yeniden taradığıChronos.exe dosyasının yanında portable.txt varsa açıktır: tüm veriler onun veri klasöründe kalırHazır ayarı destekleyen bir donanım kodlayıcısı varsa onu, yoksa yazılımı kullanırBu şablonlarla örnek bir içe aktarmanın ilk üç adı
diff --git a/i18n/uk/Settings.uk.resx b/i18n/uk/Settings.uk.resx
index 5cb16957..982a66d3 100644
--- a/i18n/uk/Settings.uk.resx
+++ b/i18n/uk/Settings.uk.resx
@@ -56,7 +56,6 @@
НемаєНалаштування архіву не збереженоВиберіть папку архіву
- Пересканувати раз наПопередній переглядРозмір проксіСкинути архів
diff --git a/i18n/uk/Tooltips.uk.resx b/i18n/uk/Tooltips.uk.resx
index f846b4af..644af630 100644
--- a/i18n/uk/Tooltips.uk.resx
+++ b/i18n/uk/Tooltips.uk.resx
@@ -343,7 +343,6 @@
Виконуються зараз або призупиненіПоказати папку в ПровідникуПриховати журнал
- Завершені завдання, старші за цей термін, видаляються під час запуску ChronosІмпортувати фото з картки або папки; після цього завдання імпорту, аналізу й рендерингу з’являтимуться тутПідвищити пріоритет: завдання виконається раніше за завдання з нижчим пріоритетомВідкрити те, з чим працювало це завдання
@@ -616,7 +615,6 @@
Версія, збірка, система, ліцензія, сторонній кодПортативний режим, журнали, діагностика, резервне копіювання й відновлення бази даних, скиданняШирина аналізу, пороги ночі й зір, глибокий аналіз
- Папка архіву, шаблони імен, розмір проксі й мініатюр, перескануванняЯкий декодер обробляє кожен формат на цьому ПК, посилання для інсталяції кодеківМова, тема, запуск, сповіщенняПравила сесій, перевірка, дублікати, дії після імпорту
@@ -627,7 +625,6 @@
Скільки фото активне завдання обробляє одночасно; завдання виконуються по одному. Менше значення залишає більше ресурсів іншим програмам · Enter застосовує, Esc скасовуєАвто: половина логічних ядерПовернути «Авто»: половина логічних ядер
- Як часто Chronos повторно сканує архів, шукаючи зміни, зроблені деінде, наприклад сервером, що спільно його використовуєУвімкнено, коли portable.txt лежить поруч із Chronos.exe: усі дані зберігаються в його папці данихВикористовувати апаратний кодувальник, якщо він підтримує пресет; інакше — програмнийПерші три імені зразкового імпорту з цими шаблонами
diff --git a/i18n/vi/Settings.vi.resx b/i18n/vi/Settings.vi.resx
index 15b5be47..b6f3260c 100644
--- a/i18n/vi/Settings.vi.resx
+++ b/i18n/vi/Settings.vi.resx
@@ -56,7 +56,6 @@
Không cóChưa lưu được cài đặt kho lưu trữChọn thư mục kho lưu trữ
- Quét lại mỗiXem trướcKích thước proxyĐặt lại kho lưu trữ
diff --git a/i18n/vi/Tooltips.vi.resx b/i18n/vi/Tooltips.vi.resx
index fcbf871d..cd7e62f5 100644
--- a/i18n/vi/Tooltips.vi.resx
+++ b/i18n/vi/Tooltips.vi.resx
@@ -339,7 +339,6 @@
Đang chạy hoặc đã tạm dừngHiển thị thư mục trong ExplorerẨn nhật ký
- Các tác vụ đã hoàn tất cũ hơn mức này sẽ bị loại bỏ khi Chronos khởi độngĐưa ảnh vào từ thẻ nhớ hoặc thư mục; các lượt nhập, phân tích và kết xuất sau đó sẽ hiện ở đâyTăng mức ưu tiên: tác vụ sẽ chạy trước các tác vụ có mức ưu tiên thấp hơnMở đối tượng mà tác vụ này đã xử lý
@@ -580,7 +579,6 @@
Phiên bản, bản dựng, hệ thống, giấy phép, mã bên thứ baChế độ di động, nhật ký, chẩn đoán, sao lưu và khôi phục cơ sở dữ liệu, đặt lạiĐộ rộng phân tích, ngưỡng ban đêm và sao, phân tích sâu
- Thư mục kho lưu trữ, mẫu đặt tên, kích thước proxy và hình thu nhỏ, quét lạiBộ giải mã xử lý từng định dạng trên máy tính này, liên kết cài đặt codecNgôn ngữ, chủ đề, khởi động, thông báoQuy tắc phiên, xác minh, trùng lặp, thao tác sau khi nhập
@@ -591,7 +589,6 @@
Số ảnh mà tác vụ đang chạy xử lý cùng lúc; các tác vụ chạy lần lượt từng cái một. Ít hơn sẽ chừa nhiều tài nguyên hơn cho chương trình khác · Enter để áp dụng, Esc để hoàn tácTự động: một nửa số lõi logicVề Tự động: một nửa số lõi logic
- Tần suất Chronos quét lại kho lưu trữ để tìm thay đổi được thực hiện ở nơi khác, chẳng hạn bởi một máy chủ dùng chung khoBật khi có portable.txt nằm cạnh Chronos.exe: mọi dữ liệu nằm trong thư mục dữ liệu của nóDùng bộ mã hóa phần cứng khi có bộ hỗ trợ cài đặt sẵn; nếu không thì dùng phần mềmBa tên đầu tiên của một lượt nhập mẫu với các mẫu này
diff --git a/i18n/zh-Hans/Settings.zh-Hans.resx b/i18n/zh-Hans/Settings.zh-Hans.resx
index ce60333c..03113add 100644
--- a/i18n/zh-Hans/Settings.zh-Hans.resx
+++ b/i18n/zh-Hans/Settings.zh-Hans.resx
@@ -56,7 +56,6 @@
无档案库设置未保存选择档案库文件夹
- 重新扫描间隔预览代理尺寸重置档案库设置
diff --git a/i18n/zh-Hans/Tooltips.zh-Hans.resx b/i18n/zh-Hans/Tooltips.zh-Hans.resx
index a2830dff..95d3f24b 100644
--- a/i18n/zh-Hans/Tooltips.zh-Hans.resx
+++ b/i18n/zh-Hans/Tooltips.zh-Hans.resx
@@ -339,7 +339,6 @@
正在运行或已暂停在资源管理器中显示文件夹隐藏日志
- 早于此期限的已完成任务会在 Chronos 启动时删除从存储卡或文件夹导入照片;导入、分析和渲染随后会显示在这里提高优先级:它将先于优先级较低的任务运行打开此任务处理的对象
@@ -580,7 +579,6 @@
版本、内部版本、系统、许可证、第三方代码便携模式、日志、诊断、数据库备份与恢复、重置分析宽度、夜间和星空阈值、深度分析
- 档案库文件夹、命名模板、代理和缩略图尺寸、重新扫描此电脑上处理各格式的解码器、编解码器安装链接语言、主题、启动、通知时段规则、校验、重复项、导入后操作
@@ -591,7 +589,6 @@
正在运行的任务同时处理的照片数;任务逐个运行。越少则为其他程序留出越多空间 · Enter 应用,Esc 还原自动:逻辑核心数的一半恢复自动:逻辑核心数的一半
- Chronos 重新扫描档案库以发现在别处(例如共享该档案库的服务器)所做更改的频率当 portable.txt 与 Chronos.exe 位于同一文件夹时开启:所有数据都保存在其数据文件夹中有硬件编码器支持该预设时使用硬件编码器,否则使用软件编码使用这些模板时示例导入的前三个名称
diff --git a/i18n/zh-Hant/Settings.zh-Hant.resx b/i18n/zh-Hant/Settings.zh-Hant.resx
index 7d3fbfb0..12eb2ec5 100644
--- a/i18n/zh-Hant/Settings.zh-Hant.resx
+++ b/i18n/zh-Hant/Settings.zh-Hant.resx
@@ -56,7 +56,6 @@
無典藏庫設定未儲存選擇典藏庫資料夾
- 重新掃描間隔預覽代理檔大小重設典藏庫
diff --git a/i18n/zh-Hant/Tooltips.zh-Hant.resx b/i18n/zh-Hant/Tooltips.zh-Hant.resx
index 7010b09a..00636f0d 100644
--- a/i18n/zh-Hant/Tooltips.zh-Hant.resx
+++ b/i18n/zh-Hant/Tooltips.zh-Hant.resx
@@ -339,7 +339,6 @@
正在執行或已暫停在檔案總管中顯示資料夾隱藏記錄
- Chronos 啟動時,會移除超過此期限的已完成工作從記憶卡或資料夾匯入相片;匯入、分析與算圖接著會顯示在這裡提高優先順序:此工作會在優先順序較低的工作之前執行開啟此工作所處理的項目
@@ -580,7 +579,6 @@
版本、組建、系統、授權、第三方程式碼可攜式模式、記錄、診斷、資料庫備份與還原、重設分析寬度、夜間與星空門檻、深度分析
- 典藏庫資料夾、命名範本、代理檔與縮圖大小、重新掃描此電腦上各格式由哪個解碼器處理、編解碼器安裝連結語言、佈景主題、啟動、通知拍攝時段規則、驗證、重複項目、匯入後動作
@@ -591,7 +589,6 @@
執行中的工作同時處理的相片數;工作會逐一執行。數量越少,留給其他程式的資源越多 · Enter 套用,Esc 還原自動:一半的邏輯核心恢復自動:一半的邏輯核心
- Chronos 重新掃描典藏庫的頻率,以偵測在他處(例如共用此典藏庫的伺服器)所做的變更當 portable.txt 與 Chronos.exe 位於同一資料夾時開啟:所有資料都保留在其 data 資料夾中預設集支援時使用硬體編碼器;否則使用軟體以這些範本進行範例匯入時的前三個名稱
diff --git a/src/Chronos.App/DesignTime/SampleData.cs b/src/Chronos.App/DesignTime/SampleData.cs
index b75eff95..d9832e4d 100644
--- a/src/Chronos.App/DesignTime/SampleData.cs
+++ b/src/Chronos.App/DesignTime/SampleData.cs
@@ -24,6 +24,7 @@ using Chronos.Core.Video;
using Chronos.Data;
using Chronos.Data.Archiving;
using Chronos.Data.Jobs;
+using Chronos.Data.Scheduling;
using Chronos.Data.Sync;
using Chronos.Protocol;
using Chronos.Protocol.Client;
@@ -33,8 +34,8 @@ namespace Chronos.App.DesignTime;
///
/// Synthetic content for --capture screenshots and the screen smoke tests ONLY: a temporary SQLite index
/// with an archive of generated JPEGs (one sequence stores its thumbnail as an embedded preview inside a fake RAW
-/// file), jobs in every state, a fake signed-in server with sequences to compare (one in conflict) and a fake
-/// encoder inventory. Everything lives in the
+/// file), jobs in every state, schedules (the system ones with runs, a weekly integrity check, a monthly report turned
+/// off), a fake signed-in server with sequences to compare (one in conflict) and a fake encoder inventory. Everything lives in the
/// capture environment's temporary folder; nothing touches the network or the user's data.
///
public sealed class SampleData
@@ -55,6 +56,8 @@ public sealed class SampleData
private ChronosDatabase? _db;
private Guid _sunrise;
private Guid _lakeComo;
+ private Guid _weeklyVerify = Guid.CreateVersion7();
+ private Guid? _scanSchedule;
private Permissions _permissions = RolePermissions.Default(UserRole.Editor);
private SampleData(AppServices services) => _services = services;
@@ -77,6 +80,8 @@ public sealed class SampleData
services.Devices = new SampleDeviceMonitor();
services.Sync.RemoteFactory = (_, _, _) => sample._remote;
services.Sync.EditorFactory = (_, _, _) => sample._remote;
+ // The schedules keep the sample's moment: nothing becomes due while the screenshots are taken.
+ services.SchedulerTime = new FixedTime(Now);
return sample;
}
@@ -109,7 +114,10 @@ public sealed class SampleData
await db.Sequences.SetTagsAsync(sequences[0].Sequence.Id, ["sunset", "harbour"]);
await db.Sequences.SetTagsAsync(sequences[9].Sequence.Id, ["holy grail"]);
- foreach (var job in Jobs(sequences.Select(s => s.Sequence).ToList(), archive.Id)) await db.Jobs.EnqueueAsync(job);
+ _scanSchedule = (await db.Schedules.GetBySystemKeyAsync(DesktopScheduleHost.ArchiveScan))?.Id;
+ var jobs = Jobs(sequences.Select(s => s.Sequence).ToList(), archive.Id).ToList();
+ foreach (var job in jobs) await db.Jobs.EnqueueAsync(job);
+ await FillSchedulesAsync(db, jobs);
await FillServerAsync(db, sequences.Select(s => s.Sequence).ToList());
await SampleCards.InsertAsync(db, (SampleDeviceMonitor)_services.Devices, _services.Environment.DataDirectory);
await FillViewsAsync(db);
@@ -126,6 +134,53 @@ public sealed class SampleData
settings.FirstRunCompleted = true;
}
+ ///
+ /// Jobs › Scheduled (owner review 2, R10): the archive scan ran 4 minutes ago (its scan is in the history), the index
+ /// backup yesterday, the housekeeping never yet; a weekly integrity check the user made, whose run waits in the queue, and
+ /// a monthly orphans report turned off.
+ ///
+ private async Task FillSchedulesAsync(ChronosDatabase db, IReadOnlyList jobs)
+ {
+ var verify = jobs.First(j => j.ScheduleId == _weeklyVerify);
+ var weekly = ScheduleRecurrence.WeeklyAt([DayOfWeek.Sunday], new TimeOnly(2, 0));
+ var created = Now.AddDays(-40);
+ await db.Schedules.InsertAsync(new Schedule
+ {
+ Id = _weeklyVerify,
+ Name = "Weekly integrity check",
+ Action = ScheduleActions.Verify,
+ ParametersJson = ScheduleMapping.ParametersJson(ScheduleActions.Verify, new ScheduleParametersDto(OlderThanDays: 30, Percent: 25)),
+ Recurrence = weekly.Format(),
+ NextRun = weekly.Next(Now, TimeZoneInfo.Local),
+ LastRun = verify.Created,
+ LastJobId = verify.Id,
+ LastOutcome = ScheduleOutcome.Queued,
+ Created = created,
+ Updated = created,
+ });
+ var monthly = ScheduleRecurrence.MonthlyAt(1, new TimeOnly(5, 0));
+ await db.Schedules.InsertAsync(new Schedule
+ {
+ Id = Guid.CreateVersion7(),
+ Name = "Monthly orphans report",
+ Action = ScheduleActions.Orphans,
+ Recurrence = monthly.Format(),
+ Enabled = false,
+ Created = created.AddMinutes(5),
+ Updated = created.AddMinutes(5),
+ });
+ if (_scanSchedule is { } scan && jobs.FirstOrDefault(j => j.ScheduleId == scan) is { } scanned)
+ await db.Schedules.RecordOutcomeAsync(scan, scanned.Id, ScheduleOutcome.Queued, scanned.Created);
+ if (await db.Schedules.GetBySystemKeyAsync(DesktopScheduleHost.IndexBackup) is { } backup)
+ await db.Schedules.RecordOutcomeAsync(backup.Id, null, ScheduleOutcome.SkippedNothing, Now.AddDays(-1).AddHours(-2));
+ }
+
+ /// A clock stopped at one moment (the schedules of the capture).
+ private sealed class FixedTime(DateTimeOffset now) : TimeProvider
+ {
+ public override DateTimeOffset GetUtcNow() => now;
+ }
+
/// Two saved views of the Library ("Not analysed, largest" and one camera), BRIEF §12.2.
private static async Task FillViewsAsync(ChronosDatabase db)
{
@@ -636,10 +691,11 @@ public sealed class SampleData
var here = _services.WorkerId;
Job Make(JobKind kind, Sequence? target, string label, JobState state, long done, long total, double? rate = null, TimeSpan? eta = null,
TimeSpan? startedAgo = null, TimeSpan? runFor = null, string? node = null, string? error = null, string? log = null,
- JobPriority priority = JobPriority.Normal, TimeSpan? createdAgo = null) => new()
+ JobPriority priority = JobPriority.Normal, TimeSpan? createdAgo = null, Guid? schedule = null) => new()
{
Id = Guid.CreateVersion7(),
Kind = kind,
+ ScheduleId = schedule,
TargetIds = target is null ? [archiveId] : [target.Id],
TargetLabel = label,
State = state,
@@ -671,9 +727,14 @@ public sealed class SampleData
yield return Make(JobKind.Proxies, s[1], s[1].DisplayTitle, JobState.Paused, 915, 1_005, startedAgo: TimeSpan.FromMinutes(14),
priority: JobPriority.Background);
yield return Make(JobKind.Render, s[3], "Aurora, Tromsø → 1080p share H.264", JobState.Queued, 0, 0, createdAgo: TimeSpan.FromMinutes(12));
- yield return Make(JobKind.Verify, null, "Archive · 2024", JobState.Queued, 0, 0, priority: JobPriority.Background, createdAgo: TimeSpan.FromMinutes(30));
+ // The weekly integrity check the user scheduled waits behind the user's jobs.
+ yield return Make(JobKind.Verify, null, "Archive · 2024", JobState.Queued, 0, 0, priority: JobPriority.Background, createdAgo: TimeSpan.FromMinutes(30),
+ schedule: _weeklyVerify);
yield return Make(JobKind.Verify, s[7], s[7].DisplayTitle, JobState.Failed, 640, 640, 900, startedAgo: TimeSpan.FromMinutes(25), runFor: TimeSpan.FromSeconds(43),
error: "2 files whose hash no longer matches the sidecar", log: "09:58:01 verify 640 files\n09:58:43 2 hash mismatches: 2025-08-02_0213.ARW, 2025-08-02_0214.ARW");
+ // The archive scan schedule's latest run.
+ yield return Make(JobKind.Scan, null, "ChronosArchive", JobState.Done, 412, 412, 640, startedAgo: TimeSpan.FromMinutes(4), runFor: TimeSpan.FromSeconds(1),
+ priority: JobPriority.Background, schedule: _scanSchedule);
yield return Make(JobKind.Render, s[5], "Milan skyline dusk → 4K HEVC", JobState.Done, 2_400, 2_400, 14.8, startedAgo: TimeSpan.FromMinutes(70),
runFor: new TimeSpan(0, 2, 41), node: "studio-pc");
yield return Make(JobKind.Import, s[0], "EOS R5 · card A → Archive · 4,812 photos", JobState.Done, 4_812, 4_812, 7.1, startedAgo: TimeSpan.FromMinutes(110),
diff --git a/src/Chronos.App/Infrastructure/AppServices.cs b/src/Chronos.App/Infrastructure/AppServices.cs
index a2f01164..17255d00 100644
--- a/src/Chronos.App/Infrastructure/AppServices.cs
+++ b/src/Chronos.App/Infrastructure/AppServices.cs
@@ -22,19 +22,22 @@ using Chronos.Data;
using Chronos.Data.Archiving;
using Chronos.Data.Jobs;
using Chronos.Data.Processing;
+using Chronos.Data.Scheduling;
using Chronos.Protocol.Client;
namespace Chronos.App.Infrastructure;
///
/// Composition root of local mode (BRIEF §4.4): the SQLite index under the data folder (migrated on open, a restore
-/// staged in Settings › Advanced carried out first, then copied once a day into the backups folder), the archive engine
-/// (WIC first, then managed decoders), the analysis and render engine (the same decoders; Media Foundation, then
-/// managed encoders), the one of this PC with the handlers of ,
-/// thumbnails, the server session, the render node, the encoder and format inventories, the update check and the sync
-/// with the signed-in server (). Started after the window shows, stopped when the app exits. The
-/// archive at Settings › Archive's folder is reopened at start and rescanned every , as is one
-/// chosen later (BRIEF §7: polling, no file-system watchers). Jobs follow Settings › Rendering and Analysis from the
+/// staged in Settings › Advanced carried out first), the archive engine (WIC first, then managed decoders), the analysis
+/// and render engine (the same decoders; Media Foundation, then managed encoders), the one of
+/// this PC with the handlers of , the that queues the
+/// recurring work (owner review 2, R10: the archive scan, the daily index backup and the housekeeping are its system
+/// schedules, ), thumbnails, the server session, the render node, the encoder and format
+/// inventories, the update check and the sync with the signed-in server (). Started after the
+/// window shows, stopped when the app exits. The archive at Settings › Archive's folder is reopened at start before the
+/// scheduler starts, and while it is unplugged every until it is back; the schedules follow
+/// the folder, also one chosen later (BRIEF §7: polling, no file-system watchers). Jobs follow Settings › Rendering and Analysis from the
/// next one on (memory budget, quality profile, analysis parameters through ; parallelism
/// as the engine's workers). The render node runs while the user offers this PC ()
/// and a server session is open (never in capture mode). Renders and the render node use hardware encoders as
@@ -52,9 +55,8 @@ public sealed class AppServices : IAsyncDisposable
private static readonly Lazy DownloadHttp = new(() => new HttpClient { Timeout = Timeout.InfiniteTimeSpan });
private readonly CancellationTokenSource _stopping = new();
private readonly Dictionary _scans = [];
- private Task _polling = Task.CompletedTask;
- private Task _backups = Task.CompletedTask;
- private PeriodicTimer? _pollTimer;
+ private readonly TaskCompletionSource _schedulerReady = new(TaskCreationOptions.RunContinuationsAsynchronously);
+ private Task _schedules = Task.CompletedTask;
private WicDecoderProvider? _wic;
private readonly RenderNodeHost _renderNode;
private ServerSession _server = null!;
@@ -68,6 +70,7 @@ public sealed class AppServices : IAsyncDisposable
_renderNode = new RenderNodeHost(StartRenderNode);
ArchiveSetup = new EngineArchiveSetup(this);
Sync = new SyncHost(this);
+ ScheduleHost = new DesktopScheduleHost(settings, () => Database, () => Archives);
Server = new ServerSession(settings, saveSettings, new ChronosServerApiFactory(), new DpapiTokenProtector());
Encoders = new MediaFoundationInventory();
Formats = new WicFormatInventory(() => _wic);
@@ -113,8 +116,20 @@ public sealed class AppServices : IAsyncDisposable
/// Decode tier per format on this PC and the missing codec extensions (Settings › Formats).
public IFormatInventory Formats { get; set; }
- /// Time between the rescans of the open archive (Settings › Archive).
- public TimeSpan ScanInterval => TimeSpan.FromMinutes(int.Clamp(Settings.ScanIntervalMinutes, 1, 24 * 60));
+ /// How often an archive that was unplugged at start is looked for again, until it is back.
+ public static TimeSpan ReopenInterval { get; } = TimeSpan.FromMinutes(1);
+
+ /// What the scheduler works with on this PC: its zone, the current archive, the system schedules.
+ public DesktopScheduleHost ScheduleHost { get; }
+
+ /// The schedules of this PC (Jobs › Scheduled); null until they run ().
+ public Scheduler? Scheduler { get; private set; }
+
+ /// True once runs; false when it never will (no index, no engine, it failed, the app stops).
+ public Task SchedulerReady => _schedulerReady.Task;
+
+ /// The clock of the schedules; the capture stops it at its sample moment.
+ public TimeProvider SchedulerTime { get; set; } = TimeProvider.System;
/// How the restore staged in Settings › Advanced went when the index opened; null when none was staged.
public StagedRestoreResult? StagedRestore { get; private set; }
@@ -186,13 +201,13 @@ public sealed class AppServices : IAsyncDisposable
public void SavePreferences() => SaveSettingsAction();
///
- /// The archive's rescan interval, now, and a review of the priority queue (Settings › Rendering): turned on, it may make
- /// the running job yield at once. The parallelism applies from the next sequence or job.
+ /// A review of the priority queue (Settings › Rendering): turned on, it may make the running job yield at once; and a
+ /// pass of the schedules, whose runs read the settings. The parallelism applies from the next sequence or job.
///
public void ApplyJobSettings()
{
Engine?.Wake();
- if (_pollTimer is { } timer && timer.Period != ScanInterval) timer.Period = ScanInterval;
+ Scheduler?.Wake();
}
/// Photos the running job of this PC processes at once (Settings › Rendering › Parallelism, Auto: half the logical cores).
@@ -216,8 +231,8 @@ public sealed class AppServices : IAsyncDisposable
///
/// Opens (or creates) the index at , migrates it (after a restore staged in Settings ›
- /// Advanced replaced it, which needs no open index: it also recovers one that no longer opens), starts the job engine
- /// and the daily backups.
+ /// Advanced replaced it, which needs no open index: it also recovers one that no longer opens), starts the job engine,
+ /// then in the background reopens the archive and starts the schedules ().
///
public async Task OpenAsync(string databasePath, CancellationToken ct = default)
{
@@ -236,26 +251,29 @@ public sealed class AppServices : IAsyncDisposable
await StartJobsAsync(Database, startEngine: true, ct);
Thumbnails = new ThumbnailService(Database, Settings.ThumbnailMemoryItems);
Devices.Start();
- var database = Database;
- _backups = Task.Run(() => DatabaseBackups.RunDailyAsync(database, Environment.BackupDirectory, null, _stopping.Token));
- _polling = PollAsync(_stopping.Token);
+ _schedules = RunSchedulesAsync(_stopping.Token);
}
- /// Uses an already open index (capture, tests) instead of opening one; sample data keeps the engine stopped.
+ ///
+ /// Uses an already open index (capture, tests) instead of opening one, and starts the schedules (no archive to reopen);
+ /// sample data keeps the engine stopped.
+ ///
public async Task AttachAsync(ChronosDatabase database, bool startEngine = true, CancellationToken ct = default)
{
Database = database;
await StartJobsAsync(database, startEngine, ct);
Thumbnails = new ThumbnailService(database, Settings.ThumbnailMemoryItems);
+ await StartSchedulerAsync(ct);
}
- /// Stops polling, the render node and the engine, then closes the index. The app's exit waits for this on the UI
- /// thread, so nothing here continues on it.
+ /// Stops the schedules, the render node and the engine, then closes the index. The app's exit waits for this on
+ /// the UI thread, so nothing here continues on it.
public async ValueTask DisposeAsync()
{
await _stopping.CancelAsync().ConfigureAwait(false);
- await _polling.ConfigureAwait(false);
- await _backups.ConfigureAwait(false);
+ await _schedules.ConfigureAwait(false);
+ _schedulerReady.TrySetResult(false);
+ if (Scheduler is not null) await Scheduler.DisposeAsync().ConfigureAwait(false);
_stopping.Dispose();
_server.PropertyChanged -= OnServerChanged;
await _renderNode.DisposeAsync().ConfigureAwait(false);
@@ -268,66 +286,77 @@ public sealed class AppServices : IAsyncDisposable
if (Database is not null) await Database.DisposeAsync().ConfigureAwait(false);
}
- /// The period of the rescans while they run (Settings › Archive › Rescan every); null before the index opens.
- internal TimeSpan? PollingPeriod => _pollTimer?.Period;
-
///
- /// One rescan of the polling, off the UI thread: the archive the Import and Archive screens work on
- /// (, the one at Settings › Archive's folder) first takes the settings another process
- /// sharing it wrote into its archive.json (also on a read-only share), then gets an incremental scan while it is
- /// online. Returns that archive; null when the index holds none.
+ /// At start, off the UI thread: reopens the archive at Settings › Archive's folder (a moved one relinked, interrupted
+ /// renames finished), then starts the schedules, whose first pass settles the runs missed while Chronos was closed. An
+ /// archive whose archive.json is not there (an unplugged drive) is looked for every until
+ /// it is back, then the schedules look at once for a due run; unless the folder changed meanwhile: whatever changed it
+ /// opened the new archive. The app's exit waits for this on the UI thread.
///
- internal Task RescanAsync(CancellationToken ct = default) => Task.Run(async () =>
- {
- if (Database is not { } db || Archives is not { } archives) return null;
- var archive = CurrentArchive.Pick(await db.Archives.ListAsync(ct).ConfigureAwait(false), Settings.LastArchivePath);
- if (archive is null) return null;
- var availability = ArchiveService.GetAvailability(archive);
- if (availability != ArchiveAvailability.Offline) await archives.RefreshSettingsAsync(archive.Id, ct).ConfigureAwait(false);
- if (availability == ArchiveAvailability.Online) await QueueScanAsync(archive, full: false, ct).ConfigureAwait(false);
- return archive;
- }, ct);
-
- ///
- /// Rescans the archive now and every () until the app exits, which
- /// waits for it on the UI thread. Each rescan follows the archive folder: one chosen on the first run, in Settings or
- /// by a relink is rescanned from the next tick on, the one before no longer. The archive at the folder of the start is
- /// first reopened (a moved one relinked, interrupted renames finished), at each tick until its archive.json is there
- /// (an unplugged drive), unless the folder changed meanwhile: whatever changed it opened the new archive.
- ///
- private async Task PollAsync(CancellationToken ct)
+ private async Task RunSchedulesAsync(CancellationToken ct)
{
var reopen = Settings.LastArchivePath is { Length: > 0 } start ? start : null;
- // Settings › Archive changes the period of this timer (ApplyJobSettings).
- using var timer = _pollTimer = new PeriodicTimer(ScanInterval);
try
{
- do
+ if (reopen is not null && await ReopenAsync(reopen, ct).ConfigureAwait(false)) reopen = null;
+ await StartSchedulerAsync(ct).ConfigureAwait(false);
+ if (reopen is null) return;
+ using var timer = new PeriodicTimer(ReopenInterval);
+ while (await timer.WaitForNextTickAsync(ct).ConfigureAwait(false))
{
- if (reopen is not null
- && (!string.Equals(reopen, Settings.LastArchivePath, StringComparison.OrdinalIgnoreCase) || await ReopenAsync(reopen, ct).ConfigureAwait(false)))
- reopen = null;
- try
- {
- await RescanAsync(ct).ConfigureAwait(false);
- }
- catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or DatabaseException or ArgumentException)
- {
- // The next tick tries again (a share that dropped, an archive removed from the index meanwhile).
- Log.Warning("archive", "The archive could not be rescanned", ex);
- }
+ if (!string.Equals(reopen, Settings.LastArchivePath, StringComparison.OrdinalIgnoreCase)) return;
+ if (!await ReopenAsync(reopen, ct).ConfigureAwait(false)) continue;
+ Scheduler?.Wake();
+ return;
}
- while (await timer.WaitForNextTickAsync(ct).ConfigureAwait(false));
}
catch (OperationCanceledException) when (ct.IsCancellationRequested)
{
}
+ catch (Exception ex) when (ex is not OperationCanceledException)
+ {
+ // The exit waits for this task: nothing it throws may stop the app from closing.
+ Log.Error("schedules", "The archive could not be reopened or the schedules started", ex);
+ }
finally
{
- _pollTimer = null;
+ _schedulerReady.TrySetResult(false);
}
}
+ ///
+ /// Starts on this PC's engine: it seeds the system schedules and runs its first pass before
+ /// turns true. Without an engine, or when the schedules cannot be read, there is none.
+ ///
+ private async Task StartSchedulerAsync(CancellationToken ct)
+ {
+ if (Database is not { } db || Engine is not { } engine || Scheduler is not null)
+ {
+ _schedulerReady.TrySetResult(Scheduler is not null);
+ return;
+ }
+ var scheduler = new Scheduler(db, engine, new SchedulerOptions { Time = SchedulerTime });
+ try
+ {
+ await Task.Run(() => scheduler.StartAsync(ScheduleHost, ct), ct).ConfigureAwait(false);
+ }
+ catch (Exception ex) when (ex is DatabaseException or IOException or InvalidOperationException or ArgumentException)
+ {
+ Log.Error("schedules", "The schedules could not be started; nothing recurring runs until the next start", ex);
+ await scheduler.DisposeAsync().ConfigureAwait(false);
+ _schedulerReady.TrySetResult(false);
+ return;
+ }
+ catch (OperationCanceledException)
+ {
+ await scheduler.DisposeAsync().ConfigureAwait(false);
+ throw;
+ }
+ Scheduler = scheduler;
+ Log.Info("schedules", "Schedules started");
+ _schedulerReady.TrySetResult(true);
+ }
+
///
/// Registers the archive at again as at open; false while its archive.json is not there. A
/// damaged or newer one is not tried again: the archive the index holds at the folder is still rescanned.
@@ -385,6 +414,9 @@ public sealed class AppServices : IAsyncDisposable
Decoder = DecoderFactory.CreateClient(_wic),
Parallelism = () => Parallelism,
MemoryBudget = () => ProcessingTuning.MemoryBudget(Settings, GC.GetGCMemoryInfo().TotalAvailableMemoryBytes),
+ // The housekeeping schedule trims the cache to Settings › Storage › Cache limit (owner review 2, R10).
+ CleanupSteps = [new CacheTrimStep(() => CacheStore.Folder(Environment, Settings), () => Settings.CacheLimitGb * (1L << 30))],
+ BackupDirectory = Environment.BackupDirectory,
};
Archives = new ArchiveService(database, archive);
Processing = new ProcessingService(database, ProcessingOptions(archive));
diff --git a/src/Chronos.App/Infrastructure/AppSettings.cs b/src/Chronos.App/Infrastructure/AppSettings.cs
index 3f331599..0e7bf5d6 100644
--- a/src/Chronos.App/Infrastructure/AppSettings.cs
+++ b/src/Chronos.App/Infrastructure/AppSettings.cs
@@ -97,7 +97,11 @@ public sealed class AppSettings
/// Thumbnail long edge of new archives (also written into the open archive), BRIEF §8.5.
public int ThumbnailLongEdge { get; set; } = 320;
- /// Minutes between the rescans of the open archive (BRIEF §7: polling by mtime and size, no file-system watchers).
+ ///
+ /// Obsolete (owner review 2, R10): the former Settings › Archive › Rescan every. Nothing edits it any more; it only seeds
+ /// the interval of the archive-scan schedule () the first time it is created,
+ /// and is what Reset puts that schedule back to. The schedule's own interval is edited in Jobs › Scheduled.
+ ///
public int ScanIntervalMinutes { get; set; } = DefaultScanIntervalMinutes;
// ---- Import (defaults of new cards and folders; a card's own profile wins) ----
diff --git a/src/Chronos.App/Infrastructure/DiagnosticsBundle.cs b/src/Chronos.App/Infrastructure/DiagnosticsBundle.cs
index 417ed95b..35c54b61 100644
--- a/src/Chronos.App/Infrastructure/DiagnosticsBundle.cs
+++ b/src/Chronos.App/Infrastructure/DiagnosticsBundle.cs
@@ -116,8 +116,15 @@ public static class DiagnosticsBundle
}
}
+/// What did: the cache's size before, the bytes and files it deleted.
+public sealed record CacheTrimResult(long Before, long Freed, int Deleted)
+{
+ /// The cache's size afterwards.
+ public long After => Before - Freed;
+}
+
///
-/// The disk cache (spilled frames, thumbnails): its folder, its size and clearing it. Only a folder Chronos created
+/// The disk cache (spilled frames, thumbnails): its folder, its size, trimming and clearing it. Only a folder Chronos created
/// (it carries a marker file) is ever emptied, so pointing the cache at a folder with user files cannot delete them.
///
public static class CacheStore
@@ -181,6 +188,69 @@ public static class CacheStore
return freed;
}
+ ///
+ /// Brings an owned cache folder down to (owner review 2, R10: the housekeeping
+ /// schedule's cache step): the least recently written files go first, files in use stay (a render spilling, an import
+ /// staging), and so does everything under the folders (relative to the cache: sets that must
+ /// stay whole), which still counts towards the size. Null when the folder is not a Chronos cache folder: nothing is
+ /// deleted there.
+ ///
+ public static CacheTrimResult? Trim(string folder, long limitBytes, IReadOnlyCollection? keep = null, CancellationToken ct = default)
+ {
+ if (!Directory.Exists(folder)) return new CacheTrimResult(0, 0, 0);
+ if (!IsOwned(folder)) return null;
+ var root = new DirectoryInfo(folder);
+ var kept = (keep ?? []).Select(k => Path.TrimEndingDirectorySeparator(Path.GetFullPath(Path.Combine(root.FullName, k))) + Path.DirectorySeparatorChar).ToList();
+ var marker = Path.Combine(root.FullName, MarkerFile);
+ var options = new EnumerationOptions { RecurseSubdirectories = true, IgnoreInaccessible = true, AttributesToSkip = FileAttributes.ReparsePoint };
+ var candidates = new List();
+ long size = 0;
+ foreach (var file in root.EnumerateFiles("*", options))
+ {
+ size += file.Length;
+ if (file.FullName.Equals(marker, StringComparison.OrdinalIgnoreCase)
+ || kept.Any(k => file.FullName.StartsWith(k, StringComparison.OrdinalIgnoreCase))) continue;
+ candidates.Add(file);
+ }
+ var before = size;
+ long freed = 0;
+ var deleted = 0;
+ foreach (var file in candidates.OrderBy(f => f.LastWriteTimeUtc))
+ {
+ if (size <= limitBytes) break;
+ ct.ThrowIfCancellationRequested();
+ // Read before the delete: a deleted file has no length.
+ var length = file.Length;
+ if (!TryDeleteUnused(file)) continue;
+ size -= length;
+ freed += length;
+ deleted++;
+ }
+ return new CacheTrimResult(before, freed, deleted);
+ }
+
+ /// Deletes a file nobody has open; false for one in use or protected.
+ private static bool TryDeleteUnused(FileInfo file)
+ {
+ try
+ {
+ // A file open anywhere else (written, read or mapped) cannot be opened exclusively: it stays.
+ using (new FileStream(file.FullName, FileMode.Open, FileAccess.ReadWrite, FileShare.None))
+ {
+ }
+ file.Delete();
+ return true;
+ }
+ catch (IOException)
+ {
+ return false;
+ }
+ catch (UnauthorizedAccessException)
+ {
+ return false;
+ }
+ }
+
private static long TryDelete(FileInfo file)
{
try
diff --git a/src/Chronos.App/Jobs/DesktopScheduleHost.cs b/src/Chronos.App/Jobs/DesktopScheduleHost.cs
new file mode 100644
index 00000000..5d704b9d
--- /dev/null
+++ b/src/Chronos.App/Jobs/DesktopScheduleHost.cs
@@ -0,0 +1,119 @@
+using System.IO;
+using Chronos.App.Archiving;
+using Chronos.App.Infrastructure;
+using Chronos.Core.Archiving;
+using Chronos.Core.Diagnostics;
+using Chronos.Core.Localization;
+using Chronos.Core.Model;
+using Chronos.Data;
+using Chronos.Data.Archiving;
+using Chronos.Data.Archiving.Jobs;
+using Chronos.Data.Housekeeping;
+using Chronos.Data.Scheduling;
+using Chronos.Protocol;
+
+namespace Chronos.App.Jobs;
+
+///
+/// The desktop's (owner review 2, R10). Times are the PC's; schedules work on the archive at
+/// Settings › Archive's folder (), which first takes the settings another process sharing it
+/// wrote into its archive.json, as the rescans before it did, and counts as none while it is offline (an unplugged
+/// drive). The system schedules stand for the timers the desktop used to run out of sight: the archive scan (its interval
+/// carried over from the former Settings › Archive › Rescan every, , once:
+/// a row that exists keeps the user's edits), the daily index backup, and the housekeeping clean-up at 04:00 (job history,
+/// cache trim). Thread-safe: the scheduler calls it from its loop.
+///
+public sealed class DesktopScheduleHost(AppSettings settings, Func database, Func archives) : IScheduleHost
+{
+ /// Incremental scan of the archive, every (10) minutes, no catch-up.
+ public const string ArchiveScan = "archive-scan";
+
+ /// Copy of the index into the backups folder, every day, with catch-up (it replaced the daily backup loop).
+ public const string IndexBackup = "index-backup";
+
+ /// Clean-up of the job history and the cache, daily at 04:00, with catch-up.
+ public const string Housekeeping = "housekeeping";
+
+ /// When the housekeeping runs.
+ public static readonly TimeOnly HousekeepingTime = new(4, 0);
+
+ /// The PC's zone; tests set another.
+ public TimeZoneInfo TimeZone { get; init; } = TimeZoneInfo.Local;
+
+ public IReadOnlyList SystemSchedules =>
+ [
+ new(ArchiveScan, "Archive scan", ScheduleActions.Scan, ScheduleRecurrence.Interval(ScanMinutes(settings), RecurrenceUnit.Minutes),
+ new ScheduleParametersDto(Force: false, Deep: settings.DeepAnalysisAfterScan), CatchUp: false),
+ new(IndexBackup, "Index backup", ScheduleActions.Backup, ScheduleRecurrence.Interval(1, RecurrenceUnit.Days),
+ new ScheduleParametersDto(Keep: DatabaseBackups.Keep)),
+ new(Housekeeping, "Housekeeping", ScheduleActions.Cleanup, ScheduleRecurrence.DailyAt(HousekeepingTime),
+ new ScheduleParametersDto(Steps: [Chronos.Data.Housekeeping.CleanupSteps.JobHistory, CacheTrimStep.StepName],
+ OlderThanDays: Chronos.Data.Housekeeping.CleanupSteps.DefaultHistoryDays)),
+ ];
+
+ public IReadOnlyList CleanupSteps => archives()?.CleanupSteps.Select(s => s.Name).ToList() ?? [];
+
+ ///
+ /// The interval the scan schedule is seeded with (and reset to): the former rescan setting, within what an interval
+ /// accepts (5 minutes to a day).
+ ///
+ public static int ScanMinutes(AppSettings settings)
+ {
+ ArgumentNullException.ThrowIfNull(settings);
+ return int.Clamp(settings.ScanIntervalMinutes, ScheduleRecurrence.MinMinutes, ScheduleRecurrence.MaxMinutes);
+ }
+
+ public async ValueTask GetArchiveAsync(CancellationToken cancellationToken)
+ {
+ if (database() is not { } db || archives() is not { } service) return null;
+ var archive = CurrentArchive.Pick(await db.Archives.ListAsync(cancellationToken).ConfigureAwait(false), settings.LastArchivePath);
+ if (archive is null || ArchiveService.GetAvailability(archive) == ArchiveAvailability.Offline) return null;
+ try
+ {
+ await service.RefreshSettingsAsync(archive.Id, cancellationToken).ConfigureAwait(false);
+ return await db.Archives.GetAsync(archive.Id, cancellationToken).ConfigureAwait(false) ?? archive;
+ }
+ catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or DatabaseException or NewerFormatException)
+ {
+ // The settings as last read: the run still works on the archive, the next one reads them again.
+ Log.Warning("schedules", $"The settings of {archive.RootPath} could not be read again", ex);
+ return archive;
+ }
+ }
+
+ /// The desktop runs every action its engine has a handler for.
+ public string? Unavailable(string action) => null;
+}
+
+///
+/// The desktop's clean-up step cache-trim (owner review 2, R10): brings the cache folder down to Settings › Storage ›
+/// Cache limit, oldest files first, skipping files in use (). The proxies of server sequences
+/// (complete sets the sync keeps), the render node's folder (it trims its own downloads to the same limit) and the copies an
+/// import to the server stages are never trimmed; Settings › Storage › Clear still empties everything.
+///
+public sealed class CacheTrimStep(Func folder, Func limitBytes) : ICleanupStep
+{
+ public const string StepName = "cache-trim";
+
+ /// Folders of the cache the trim leaves whole.
+ public static IReadOnlyList Kept { get; } = ["proxies", "render-node", "server-import"];
+
+ public string Name => StepName;
+
+ public Task RunAsync(CleanupContext context, CleanupParameters parameters)
+ {
+ ArgumentNullException.ThrowIfNull(context);
+ var limit = limitBytes();
+ return Task.Run(() =>
+ {
+ var result = CacheStore.Trim(folder(), limit, Kept, context.Cancellation);
+ if (result is null) return Loc.L("Jobs.Log.CacheNotOwned");
+ return result.Deleted == 0
+ ? Loc.L("Jobs.Log.CacheKept", Gigabytes(result.After), Gigabytes(limit))
+ : Loc.L("Jobs.Log.CacheTrimmed", Gigabytes(result.After), Gigabytes(limit), Gigabytes(result.Freed));
+ }, context.Cancellation);
+ }
+
+ /// "12.4 GB" in the binary gigabytes of Settings › Storage › Cache limit.
+ private static string Gigabytes(long bytes) => Loc.L("Common.Size.GB", (bytes / (double)(1L << 30)).ToString("0.#", Loc.Culture));
+}
diff --git a/src/Chronos.App/Jobs/JobNotices.cs b/src/Chronos.App/Jobs/JobNotices.cs
index a01c623b..2634a80c 100644
--- a/src/Chronos.App/Jobs/JobNotices.cs
+++ b/src/Chronos.App/Jobs/JobNotices.cs
@@ -13,9 +13,10 @@ public enum JobNotice
///
/// Which job endings raise a toast (BRIEF §12.1 "toasts for job completion"): the long operations the user asked for
/// end with one toast, whichever screen started them. Background work (thumbnails, proxies, light analysis, the
-/// analysis queued after an import) and scans (the archive is rescanned every 10 minutes) end silently; an import
+/// analysis queued after an import) and scans (the archive scan schedule runs every 10 minutes) end silently; an import
/// has its own toast when it ends well, and a download shows on its Library card and Server row. Every other failure
-/// is said. Cancelled jobs were stopped on purpose.
+/// is said. A schedule's background run (owner review 2, R10: the index backup, a weekly verify) is said only when it
+/// fails, unless it is upkeep the next run repeats. Cancelled jobs were stopped on purpose.
///
public static class JobNotices
{
@@ -26,7 +27,9 @@ public static class JobNotices
public static JobNotice For(JobState? before, Job job)
{
ArgumentNullException.ThrowIfNull(job);
- if (before is JobState.Done or JobState.Failed or JobState.Cancelled || job.Priority == JobPriority.Background) return JobNotice.None;
+ if (before is JobState.Done or JobState.Failed or JobState.Cancelled) return JobNotice.None;
+ if (job.Priority == JobPriority.Background)
+ return job.ScheduleId is not null && job.State == JobState.Failed && !IsUpkeep(job.Kind) ? JobNotice.Failed : JobNotice.None;
return job.State switch
{
JobState.Done when Announces(job.Kind) => JobNotice.Done,
diff --git a/src/Chronos.App/Jobs/JobRowViewModel.cs b/src/Chronos.App/Jobs/JobRowViewModel.cs
index fd0ab739..4d7e3f53 100644
--- a/src/Chronos.App/Jobs/JobRowViewModel.cs
+++ b/src/Chronos.App/Jobs/JobRowViewModel.cs
@@ -36,6 +36,9 @@ public sealed class JobRowViewModel : ObservableObject
public string Target => _entry.Job.TargetLabel ?? string.Empty;
+ /// A schedule queued the job (owner review 2, R10): the row shows a "Scheduled" pill.
+ public bool IsScheduled => _entry.Job.ScheduleId is not null;
+
/// "Render · Harbour sunset → 4K HEVC": the row's name for screen readers.
public string AccessibleName => JobText.Name(_entry.Job);
diff --git a/src/Chronos.App/Jobs/ScheduleDialogs.xaml b/src/Chronos.App/Jobs/ScheduleDialogs.xaml
new file mode 100644
index 00000000..21ef29a3
--- /dev/null
+++ b/src/Chronos.App/Jobs/ScheduleDialogs.xaml
@@ -0,0 +1,245 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Chronos.App/Jobs/ScheduleEditorViewModel.cs b/src/Chronos.App/Jobs/ScheduleEditorViewModel.cs
new file mode 100644
index 00000000..759b969c
--- /dev/null
+++ b/src/Chronos.App/Jobs/ScheduleEditorViewModel.cs
@@ -0,0 +1,545 @@
+using System.Collections;
+using System.ComponentModel;
+using System.Globalization;
+using System.IO;
+using System.Windows.Input;
+using Chronos.App.Settings;
+using Chronos.Core.Diagnostics;
+using Chronos.Core.Localization;
+using Chronos.Core.Model;
+using Chronos.Data;
+using Chronos.Data.Jobs;
+using Chronos.Data.Scheduling;
+using Chronos.Protocol;
+using Chronos.Ui.Mvvm;
+
+namespace Chronos.App.Jobs;
+
+/// A text field of the schedule editor: checked as it is typed, its problem in the tooltip (DESIGN §4 inputs).
+public sealed class ScheduleField : ObservableObject, INotifyDataErrorInfo
+{
+ private readonly Func _validate;
+ private readonly Func _toolTip;
+ private string _text;
+ private string? _error;
+
+ public ScheduleField(string text, Func validate, Func toolTip)
+ {
+ _text = text;
+ _validate = validate;
+ _toolTip = toolTip;
+ _error = validate(text);
+ }
+
+ /// The text changed, or its problem did.
+ public event Action? Changed;
+
+ public event EventHandler? ErrorsChanged;
+
+ public string Text
+ {
+ get => _text;
+ set
+ {
+ if (!Set(ref _text, value ?? string.Empty)) return;
+ Validate();
+ Changed?.Invoke();
+ }
+ }
+
+ /// The problem of the text; null when it is valid.
+ public string? Error => _error;
+
+ public bool HasErrors => _error is not null;
+
+ /// The problem while invalid, otherwise what the field is for.
+ public string ToolTip => _error ?? _toolTip();
+
+ public IEnumerable GetErrors(string? propertyName) =>
+ _error is not null && propertyName is null or "" or nameof(Text) ? new[] { _error } : Array.Empty();
+
+ /// Checks the text again (a rule it depends on changed: the interval's unit).
+ public void Validate()
+ {
+ var error = _validate(_text);
+ if (error == _error) return;
+ _error = error;
+ OnPropertyChanged(nameof(Error));
+ OnPropertyChanged(nameof(HasErrors));
+ OnPropertyChanged(nameof(ToolTip));
+ ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(nameof(Text)));
+ Changed?.Invoke();
+ }
+
+ internal void Refresh()
+ {
+ _error = _validate(_text);
+ OnPropertyChanged(string.Empty);
+ ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(nameof(Text)));
+ }
+}
+
+/// An action of the editor's list: unavailable ones are shown disabled, their reason in the tooltip.
+public sealed record ScheduleActionOption(string Name, bool IsAvailable, string? Reason)
+{
+ public string Label => ScheduleText.Action(Name);
+
+ public string ToolTip => IsAvailable ? ScheduleText.ActionToolTip(Name) : ScheduleText.Unavailable(Reason);
+
+ public override string ToString() => Label;
+}
+
+/// A checkable choice of the editor (a day of the week, a clean-up step).
+public sealed class ScheduleChoice(T value, Func label, Func toolTip, bool isChecked, Action changed) : ObservableObject
+{
+ private bool _isChecked = isChecked;
+
+ public T Value { get; } = value;
+
+ public string Label => label();
+
+ public string ToolTip => toolTip();
+
+ public bool IsChecked
+ {
+ get => _isChecked;
+ set
+ {
+ if (Set(ref _isChecked, value)) changed();
+ }
+ }
+
+ internal void Refresh() => OnAllPropertiesChanged();
+}
+
+///
+/// The in-window editor of a schedule (owner review 2, R10): its name (a system schedule keeps its own), its action (those
+/// this PC cannot run are disabled, their reason in the tooltip), when it runs (every n minutes, hours or days; daily,
+/// weekly or monthly at a time of this PC's zone), the action's parameters, the priority of its jobs, catch-up and on/off.
+/// Every field is checked as it is typed with the scheduler's own limits; Save stays off while one is invalid and its
+/// tooltip names the first problem. One primary action, one way out (Cancel, Esc).
+///
+public sealed class ScheduleEditorViewModel : LocalizedViewModel
+{
+ private readonly SchedulesViewModel _owner;
+ private readonly ScheduleDto? _schedule;
+ private ScheduleActionOption _action;
+ private int _kindIndex;
+ private SettingsOption _unit;
+ private SettingsOption _priority;
+ private bool _catchUp;
+ private bool _enabled;
+ private bool _force;
+ private bool _deep;
+ private bool _dryRun;
+ private bool _isBusy;
+ private string? _errorText;
+ private string? _errorToolTip;
+ private IReadOnlyList> _steps = [];
+
+ internal ScheduleEditorViewModel(SchedulesViewModel owner, ScheduleDto? schedule)
+ {
+ _owner = owner;
+ _schedule = schedule;
+ var available = owner.Actions;
+ ActionOptions = [.. ScheduleActions.All.Select(a => available.FirstOrDefault(x => x.Name == a) is { } info
+ ? new ScheduleActionOption(a, info.Available, info.Reason)
+ : new ScheduleActionOption(a, true, null))];
+ _action = schedule is not null
+ ? ActionOptions.FirstOrDefault(o => o.Name == schedule.Action) ?? new ScheduleActionOption(schedule.Action, false, null)
+ : ActionOptions.FirstOrDefault(o => o.IsAvailable) ?? ActionOptions[0];
+
+ Name = new ScheduleField(schedule is null ? string.Empty : schedule.Name, ValidateName, () => Loc.L(IsSystem ? "Tooltips.Jobs.Editor.SystemName" : "Tooltips.Jobs.Editor.Name"));
+
+ // When: the stored recurrence, or every day at 03:00 for a new schedule.
+ var recurrence = ScheduleMapping.FromDto(schedule?.Recurrence) ?? ScheduleRecurrence.DailyAt(new TimeOnly(3, 0));
+ _kindIndex = (int)recurrence.Kind;
+ Units = [.. Enum.GetValues().Select(u => new SettingsOption(u, Loc.L("Jobs.Editor.Unit." + u)))];
+ _unit = Units.First(u => u.Value == (recurrence.Kind == RecurrenceKind.Every ? recurrence.Unit : RecurrenceUnit.Hours));
+ Every = new ScheduleField(Number(recurrence.Kind == RecurrenceKind.Every ? recurrence.Every : 6), ValidateEvery, () => Loc.L("Tooltips.Jobs.Editor.Every"));
+ Time = new ScheduleField(recurrence.Time.ToString("HH:mm", CultureInfo.InvariantCulture), ValidateTime, () => Loc.L("Tooltips.Jobs.Editor.Time"));
+ var weekly = recurrence.Kind == RecurrenceKind.Weekly ? recurrence.Days : [DayOfWeek.Monday];
+ var first = Loc.Culture.DateTimeFormat.FirstDayOfWeek;
+ Days = [.. Enumerable.Range(0, 7).Select(i => (DayOfWeek)(((int)first + i) % 7)).Select(d =>
+ new ScheduleChoice(d, () => ScheduleText.DayShort(d), () => ScheduleText.DayLong(d), weekly.Contains(d), OnChanged))];
+ DayOfMonth = new ScheduleField(Number(recurrence.Kind == RecurrenceKind.Monthly ? recurrence.DayOfMonth : 1), ValidateDayOfMonth,
+ () => Loc.L("Tooltips.Jobs.Editor.DayOfMonth"));
+
+ OlderThan = new ScheduleField(string.Empty, v => ValidateNumber(v, 0, ScheduleActions.MaxDays), () => Loc.L(IsVerify ? "Tooltips.Jobs.Editor.Unverified" : "Tooltips.Jobs.Editor.OlderThan"));
+ Percent = new ScheduleField(string.Empty, v => ValidateNumber(v, 1, 100), () => Loc.L("Tooltips.Jobs.Editor.Percent"));
+ Keep = new ScheduleField(string.Empty, v => ValidateNumber(v, 1, 100), () => Loc.L("Tooltips.Jobs.Editor.Keep"));
+ LoadParameters(schedule?.Parameters ?? ScheduleActions.Defaults(_action.Name));
+
+ Priorities = [.. new[] { JobPriority.Background, JobPriority.Normal, JobPriority.User }.Select(p => new SettingsOption(p, ScheduleText.Priority(p)))];
+ var priority = schedule is not null && JobWire.TryParsePriority(schedule.Priority, out var stored) ? stored : JobPriority.Background;
+ _priority = Priorities.First(p => p.Value == priority);
+ _catchUp = schedule?.CatchUp ?? true;
+ _enabled = schedule?.Enabled ?? true;
+
+ foreach (var field in new[] { Name, Every, Time, DayOfMonth, OlderThan, Percent, Keep }) field.Changed += OnChanged;
+ SaveCommand = new AsyncRelayCommand(SaveAsync, () => !_isBusy && Problem() is null);
+ CloseCommand = new RelayCommand(() => _owner.CloseEditor(this), () => !_isBusy);
+ }
+
+ /// The schedule edited; null for a new one.
+ public Guid? ScheduleId => _schedule?.Id;
+
+ public bool IsNew => _schedule is null;
+
+ /// A system schedule keeps its name and action.
+ public bool IsSystem => _schedule?.SystemKey is not null;
+
+ public string Heading => _schedule is null ? Loc.L("Jobs.Schedule.New") : Loc.L("Jobs.Editor.Heading", ScheduleText.Name(_schedule));
+
+ public ScheduleField Name { get; }
+
+ /// The name shown for a system schedule, which is not edited.
+ public string SystemName => _schedule is null ? string.Empty : ScheduleText.Name(_schedule);
+
+ public IReadOnlyList ActionOptions { get; }
+
+ public ScheduleActionOption SelectedAction
+ {
+ get => _action;
+ set
+ {
+ if (value is null || !value.IsAvailable || IsSystem || !Set(ref _action, value)) return;
+ // Another action starts from its own defaults, as the scheduler does.
+ LoadParameters(ScheduleActions.Defaults(value.Name));
+ OnPropertyChanged(string.Empty);
+ OnChanged();
+ }
+ }
+
+ public string ActionToolTip => IsSystem ? Loc.L("Tooltips.Jobs.Editor.SystemAction") : _action.ToolTip;
+
+ /// The action can be chosen (not for a system schedule).
+ public bool CanChangeAction => !IsSystem;
+
+ // ---------------- When ----------------
+
+ /// 0 every, 1 daily, 2 weekly, 3 monthly (the segmented control's index; order).
+ public int KindIndex
+ {
+ get => _kindIndex;
+ set
+ {
+ if (value is < 0 or > 3 || !Set(ref _kindIndex, value)) return;
+ OnPropertyChanged(nameof(IsEvery));
+ OnPropertyChanged(nameof(HasTime));
+ OnPropertyChanged(nameof(IsWeekly));
+ OnPropertyChanged(nameof(IsMonthly));
+ OnChanged();
+ }
+ }
+
+ public RecurrenceKind Kind => (RecurrenceKind)_kindIndex;
+
+ public bool IsEvery => Kind == RecurrenceKind.Every;
+ public bool HasTime => Kind != RecurrenceKind.Every;
+ public bool IsWeekly => Kind == RecurrenceKind.Weekly;
+ public bool IsMonthly => Kind == RecurrenceKind.Monthly;
+
+ public ScheduleField Every { get; }
+
+ public IReadOnlyList> Units { get; }
+
+ public SettingsOption SelectedUnit
+ {
+ get => _unit;
+ set
+ {
+ if (value is null || !Set(ref _unit, value)) return;
+ Every.Validate();
+ OnChanged();
+ }
+ }
+
+ public ScheduleField Time { get; }
+
+ /// The days of a weekly schedule, from the first day of the UI language's week.
+ public IReadOnlyList> Days { get; }
+
+ public ScheduleField DayOfMonth { get; }
+
+ /// "Daily at 03:00": the recurrence as the table will show it; "—" while a field is invalid.
+ public string WhenText => Recurrence() is { } recurrence ? ScheduleText.When(recurrence) : "—";
+
+ // ---------------- Parameters ----------------
+
+ public bool ShowsForce => _action.Name is ScheduleActions.Scan or ScheduleActions.Thumbnails or ScheduleActions.Proxies;
+ public bool ShowsDeep => _action.Name is ScheduleActions.Scan or ScheduleActions.Analysis;
+ public bool ShowsOlderThan => _action.Name is ScheduleActions.Verify or ScheduleActions.Cleanup;
+ public bool ShowsPercent => _action.Name == ScheduleActions.Verify;
+ public bool ShowsDryRun => _action.Name == ScheduleActions.Maintenance;
+ public bool ShowsKeep => _action.Name == ScheduleActions.Backup;
+ public bool ShowsSteps => _action.Name == ScheduleActions.Cleanup;
+
+ /// The action has on/off parameters (full scan, deep analysis, report only), shown together on one row.
+ public bool HasSwitches => ShowsForce || ShowsDeep || ShowsDryRun;
+
+ public bool Force
+ {
+ get => _force;
+ set => Set(ref _force, value);
+ }
+
+ public string ForceLabel => Loc.L(_action.Name == ScheduleActions.Scan ? "Jobs.Editor.FullScan" : "Jobs.Editor.RebuildAll");
+
+ public string ForceToolTip => Loc.L(_action.Name == ScheduleActions.Scan ? "Tooltips.Jobs.Editor.FullScan" : "Tooltips.Jobs.Editor.RebuildAll");
+
+ public bool Deep
+ {
+ get => _deep;
+ set => Set(ref _deep, value);
+ }
+
+ public string DeepToolTip => Loc.L(_action.Name == ScheduleActions.Scan ? "Tooltips.Jobs.Editor.DeepAfterScan" : "Tooltips.Jobs.Editor.DeepAnalysis");
+
+ public bool DryRun
+ {
+ get => _dryRun;
+ set => Set(ref _dryRun, value);
+ }
+
+ public ScheduleField OlderThan { get; }
+
+ public string OlderThanLabel => Loc.L(IsVerify ? "Jobs.Editor.Unverified" : "Jobs.Editor.OlderThan");
+
+ public ScheduleField Percent { get; }
+
+ public ScheduleField Keep { get; }
+
+ /// The clean-up steps this PC runs, those of the schedule checked.
+ public IReadOnlyList> Steps
+ {
+ get => _steps;
+ private set => Set(ref _steps, value);
+ }
+
+ // ---------------- Options ----------------
+
+ public IReadOnlyList> Priorities { get; }
+
+ public SettingsOption SelectedPriority
+ {
+ get => _priority;
+ set
+ {
+ if (value is not null) Set(ref _priority, value);
+ }
+ }
+
+ public bool CatchUp
+ {
+ get => _catchUp;
+ set => Set(ref _catchUp, value);
+ }
+
+ public bool Enabled
+ {
+ get => _enabled;
+ set => Set(ref _enabled, value);
+ }
+
+ // ---------------- Save ----------------
+
+ public ICommand SaveCommand { get; }
+
+ /// Cancel: closes without saving.
+ public ICommand CloseCommand { get; }
+
+ public string SaveToolTip => Problem() ?? Loc.L(IsNew ? "Tooltips.Jobs.Editor.Create" : "Tooltips.Jobs.Editor.Save");
+
+ public bool IsBusy
+ {
+ get => _isBusy;
+ private set
+ {
+ if (!Set(ref _isBusy, value)) return;
+ CommandManager.InvalidateRequerySuggested();
+ }
+ }
+
+ /// Why the last save did not happen; null when nothing failed.
+ public string? ErrorText
+ {
+ get => _errorText;
+ private set => Set(ref _errorText, value);
+ }
+
+ public string? ErrorToolTip
+ {
+ get => _errorToolTip;
+ private set => Set(ref _errorToolTip, value);
+ }
+
+ ///
+ /// The first invalid field's problem, in the order of the dialog (name, when, parameters); null when the schedule can
+ /// be saved.
+ ///
+ public string? Problem()
+ {
+ if (!IsSystem && Name.Error is { } name) return name;
+ switch (Kind)
+ {
+ case RecurrenceKind.Every when Every.Error is { } every:
+ return every;
+ case RecurrenceKind.Every:
+ break;
+ default:
+ if (Time.Error is { } time) return time;
+ if (Kind == RecurrenceKind.Weekly && !Days.Any(d => d.IsChecked)) return Loc.L("Tooltips.Jobs.Editor.NoDays");
+ if (Kind == RecurrenceKind.Monthly && DayOfMonth.Error is { } day) return day;
+ break;
+ }
+ if (ShowsOlderThan && OlderThan.Error is { } older) return older;
+ if (ShowsPercent && Percent.Error is { } percent) return percent;
+ if (ShowsKeep && Keep.Error is { } keep) return keep;
+ if (ShowsSteps && !Steps.Any(s => s.IsChecked)) return Loc.L("Tooltips.Jobs.Editor.NoSteps");
+ return null;
+ }
+
+ /// The recurrence the fields describe; null while one of them is invalid.
+ public RecurrenceDto? Recurrence()
+ {
+ var time = Time.Error is null && TryTime(Time.Text, out var at) ? at.ToString("HH:mm", CultureInfo.InvariantCulture) : null;
+ RecurrenceDto? dto = Kind switch
+ {
+ RecurrenceKind.Every when TryNumber(Every.Text, out var every) => new RecurrenceDto("every", Every: every, Unit: ScheduleMapping.Unit(_unit.Value)),
+ RecurrenceKind.Daily when time is not null => new RecurrenceDto("daily", Time: time),
+ RecurrenceKind.Weekly when time is not null && Days.Any(d => d.IsChecked) =>
+ new RecurrenceDto("weekly", Time: time, Days: [.. Days.Where(d => d.IsChecked).Select(d => ScheduleRecurrence.DayName(d.Value))]),
+ RecurrenceKind.Monthly when time is not null && TryNumber(DayOfMonth.Text, out var day) => new RecurrenceDto("monthly", Time: time, DayOfMonth: day),
+ _ => null,
+ };
+ return ScheduleMapping.FromDto(dto) is not null ? dto : null;
+ }
+
+ /// The action's parameters as the fields hold them (only the action's own).
+ public ScheduleParametersDto Parameters() => ScheduleActions.Normalize(_action.Name, new ScheduleParametersDto(
+ OlderThanDays: ShowsOlderThan && TryNumber(OlderThan.Text, out var days) ? days : null,
+ Percent: ShowsPercent && TryNumber(Percent.Text, out var percent) ? percent : null,
+ Deep: ShowsDeep ? _deep : null,
+ DryRun: ShowsDryRun ? _dryRun : null,
+ Force: ShowsForce ? _force : null,
+ Steps: ShowsSteps ? [.. Steps.Where(s => s.IsChecked).Select(s => s.Value)] : null,
+ Keep: ShowsKeep && TryNumber(Keep.Text, out var keep) ? keep : null));
+
+ internal CreateScheduleRequest BuildCreate() =>
+ new(Name.Text.Trim(), _action.Name, Recurrence()!, Parameters(), _catchUp, JobWire.Priority(_priority.Value), _enabled);
+
+ /// Every field the dialog shows; a system schedule's name and action are left out (they stay).
+ internal UpdateScheduleRequest BuildUpdate() =>
+ new(IsSystem ? null : Name.Text.Trim(), IsSystem ? null : _action.Name, Recurrence(), Parameters(), _catchUp, JobWire.Priority(_priority.Value), _enabled);
+
+ protected override void OnLanguageChanged()
+ {
+ foreach (var field in new[] { Name, Every, Time, DayOfMonth, OlderThan, Percent, Keep }) field.Refresh();
+ foreach (var day in Days) day.Refresh();
+ foreach (var step in Steps) step.Refresh();
+ base.OnLanguageChanged();
+ }
+
+ private bool IsVerify => _action.Name == ScheduleActions.Verify;
+
+ /// Save: the schedule as the fields hold it; the editor closes once it is stored, or says why it was not.
+ internal async Task SaveAsync()
+ {
+ if (Problem() is not null) return;
+ IsBusy = true;
+ ErrorText = null;
+ ErrorToolTip = null;
+ try
+ {
+ var result = await _owner.SaveAsync(this);
+ if (result.Problem is { } problem)
+ {
+ ErrorText = Loc.L("Jobs.Editor.Refused");
+ ErrorToolTip = Loc.L("Tooltips.Jobs.Editor.Refused", problem);
+ return;
+ }
+ IsBusy = false;
+ _owner.CloseEditor(this);
+ }
+ catch (Exception ex) when (ex is DatabaseException or IOException or InvalidOperationException)
+ {
+ Log.Warning("schedules", "A schedule could not be saved", ex);
+ ErrorText = Loc.L("Jobs.Editor.SaveFailed");
+ ErrorToolTip = ex.Message;
+ }
+ finally
+ {
+ IsBusy = false;
+ }
+ }
+
+ /// Fills the parameter fields from (normalised for the current action).
+ private void LoadParameters(ScheduleParametersDto parameters)
+ {
+ var p = ScheduleActions.Normalize(_action.Name, parameters);
+ var defaults = ScheduleActions.Defaults(ScheduleActions.Verify);
+ _force = p.Force ?? false;
+ _deep = p.Deep ?? false;
+ _dryRun = p.DryRun ?? false;
+ OlderThan.Text = Number(p.OlderThanDays ?? defaults.OlderThanDays ?? 30);
+ // Its tooltip names what the days count (unverified, or older), which follows the action.
+ OlderThan.Refresh();
+ Percent.Text = Number(p.Percent ?? defaults.Percent ?? 100);
+ Keep.Text = Number(p.Keep ?? DatabaseBackups.Keep);
+ var chosen = p.Steps ?? [];
+ // The steps this PC runs, then any the schedule names that it does not (kept, shown by their wire name).
+ var names = _owner.Steps.Concat(chosen.Where(s => !_owner.Steps.Contains(s))).ToList();
+ Steps = [.. names.Select(s => new ScheduleChoice(s, () => ScheduleText.Step(s), () => ScheduleText.StepToolTip(s), chosen.Contains(s), OnChanged))];
+ }
+
+ private void OnChanged()
+ {
+ OnPropertyChanged(nameof(WhenText));
+ OnPropertyChanged(nameof(SaveToolTip));
+ CommandManager.InvalidateRequerySuggested();
+ }
+
+ private string? ValidateName(string text)
+ {
+ if (string.IsNullOrWhiteSpace(text)) return Loc.L("Tooltips.Jobs.Editor.NameMissing");
+ return text.Trim().Length > Scheduler.MaxNameLength ? Loc.L("Tooltips.Jobs.Editor.NameLong", Scheduler.MaxNameLength) : null;
+ }
+
+ private string? ValidateEvery(string text)
+ {
+ var (min, max) = _unit.Value switch
+ {
+ RecurrenceUnit.Minutes => (ScheduleRecurrence.MinMinutes, ScheduleRecurrence.MaxMinutes),
+ RecurrenceUnit.Days => (1, ScheduleRecurrence.MaxDays),
+ _ => (1, ScheduleRecurrence.MaxHours),
+ };
+ return ValidateNumber(text, min, max);
+ }
+
+ private static string? ValidateDayOfMonth(string text) => ValidateNumber(text, 1, ScheduleRecurrence.MaxDayOfMonth);
+
+ private static string? ValidateTime(string text) => TryTime(text, out _) ? null : Loc.L("Tooltips.Jobs.Editor.TimeInvalid");
+
+ private static string? ValidateNumber(string text, int min, int max) =>
+ TryNumber(text, out var value) && value >= min && value <= max ? null : Loc.L("Tooltips.Jobs.Editor.Number", Number(min), Number(max));
+
+ private static string Number(int value) => value.ToString(CultureInfo.CurrentCulture);
+
+ /// A whole number as the user's culture writes it (no sign, no thousands).
+ private static bool TryNumber(string text, out int value) =>
+ int.TryParse(text.Trim(), NumberStyles.None, CultureInfo.CurrentCulture, out value) || int.TryParse(text.Trim(), NumberStyles.None, CultureInfo.InvariantCulture, out value);
+
+ /// "03:00", "3:00", "3.00": hours and minutes of a 24-hour clock.
+ internal static bool TryTime(string text, out TimeOnly time)
+ {
+ time = default;
+ var parts = text.Trim().Split(':', '.');
+ if (parts is not [var h, var m] || h.Length is < 1 or > 2 || m.Length != 2) return false;
+ if (!int.TryParse(h, NumberStyles.None, CultureInfo.InvariantCulture, out var hour) || !int.TryParse(m, NumberStyles.None, CultureInfo.InvariantCulture, out var minute)
+ || hour > 23 || minute > 59)
+ return false;
+ time = new TimeOnly(hour, minute);
+ return true;
+ }
+}
diff --git a/src/Chronos.App/Jobs/ScheduleRowViewModel.cs b/src/Chronos.App/Jobs/ScheduleRowViewModel.cs
new file mode 100644
index 00000000..e7942033
--- /dev/null
+++ b/src/Chronos.App/Jobs/ScheduleRowViewModel.cs
@@ -0,0 +1,186 @@
+using System.Windows.Input;
+using Chronos.App.Infrastructure;
+using Chronos.Core.Localization;
+using Chronos.Core.Model;
+using Chronos.Data.Jobs;
+using Chronos.Protocol;
+using Chronos.Ui.Controls;
+using Chronos.Ui.Mvvm;
+
+namespace Chronos.App.Jobs;
+
+///
+/// One row of Jobs › Scheduled (owner review 2, R10): the on/off switch, name, action, when it runs, the next run and the
+/// last result, and its commands (Run now, Edit, then Reset for a system schedule or Delete for one the user created).
+///
+public sealed class ScheduleRowViewModel : ObservableObject
+{
+ private readonly SchedulesViewModel _owner;
+ private ScheduleDto _schedule;
+ private Job? _lastJob;
+ private bool _isEnabled;
+
+ internal ScheduleRowViewModel(ScheduleDto schedule, SchedulesViewModel owner)
+ {
+ _schedule = schedule;
+ _owner = owner;
+ _isEnabled = schedule.Enabled;
+ RunNowCommand = new AsyncRelayCommand(() => owner.RunNowAsync(this), () => IsAvailable);
+ EditCommand = new RelayCommand(() => owner.Edit(this));
+ DeleteCommand = new AsyncRelayCommand(() => owner.DeleteAsync(this), () => !IsSystem);
+ ResetCommand = new AsyncRelayCommand(() => owner.ResetAsync(this), () => IsSystem);
+ }
+
+ public ScheduleDto Schedule => _schedule;
+ public Guid Id => _schedule.Id;
+
+ /// A system schedule: one of the host's timers, reset instead of deleted.
+ public bool IsSystem => _schedule.SystemKey is not null;
+
+ /// The job the last run queued, when it is known.
+ public Job? LastJob => _lastJob;
+
+ public string Name => ScheduleText.Name(_schedule);
+
+ public string NameToolTip => IsSystem ? Loc.L("Tooltips.Jobs.Schedule.System", Name) : Name;
+
+ public string ActionText => ScheduleText.Action(_schedule.Action);
+
+ /// What the action does, or why this PC does not run it.
+ public string ActionToolTip => IsAvailable ? ScheduleText.ActionToolTip(_schedule.Action) : ScheduleText.Unavailable(_owner.UnavailableReason(_schedule.Action));
+
+ /// This PC runs the schedule's action.
+ public bool IsAvailable => _owner.IsAvailable(_schedule.Action);
+
+ public string WhenText => ScheduleText.When(_schedule.Recurrence);
+
+ /// When it runs, whether a missed run is caught up, and the priority of its jobs.
+ public string WhenToolTip => string.Join(Loc.Separator, WhenText,
+ Loc.L(_schedule.CatchUp ? "Tooltips.Jobs.Schedule.CatchUpOn" : "Tooltips.Jobs.Schedule.CatchUpOff"),
+ Loc.L("Tooltips.Jobs.Schedule.PriorityIs", ScheduleText.Priority(Priority)));
+
+ public string NextText => ScheduleText.Next(_schedule.NextRun, _schedule.Enabled);
+
+ public string NextToolTip => !_schedule.Enabled ? Loc.L("Tooltips.Jobs.Schedule.NextOff")
+ : _schedule.NextRun is { } next ? Loc.L("Tooltips.Jobs.Schedule.Next", Formatting.Date(next) + " " + Formatting.TimeOfDay(next))
+ : Loc.L("Tooltips.Jobs.Schedule.NextPending");
+
+ public string LastText => ScheduleText.Outcome(_schedule.LastOutcome, _lastJob);
+
+ public string LastToolTip => ScheduleText.OutcomeToolTip(_schedule.LastOutcome, _schedule.LastRun, _lastJob);
+
+ public StatusKind LastKind => ScheduleText.OutcomeKind(_schedule.LastOutcome, _lastJob);
+
+ /// Off, a schedule never runs by itself (Run now still runs it). Turning it on or off saves at once.
+ public bool IsEnabled
+ {
+ get => _isEnabled;
+ set
+ {
+ if (Set(ref _isEnabled, value)) _ = _owner.SetEnabledAsync(this, value);
+ }
+ }
+
+ public string EnabledToolTip => Loc.L(_isEnabled ? "Tooltips.Jobs.Schedule.EnabledOn" : "Tooltips.Jobs.Schedule.EnabledOff");
+
+ /// "Index backup · Index backup · Daily at 03:00": the row's name for screen readers.
+ public string AccessibleName => string.Join(Loc.Separator, Name, ActionText, WhenText);
+
+ public ICommand RunNowCommand { get; }
+ public ICommand EditCommand { get; }
+ public ICommand DeleteCommand { get; }
+ public ICommand ResetCommand { get; }
+
+ public string RunNowToolTip => IsAvailable ? Loc.L("Tooltips.Jobs.Schedule.RunNow") : ScheduleText.Unavailable(_owner.UnavailableReason(_schedule.Action));
+
+ /// "Run now: Index backup", what each row button is called for screen readers.
+ public string RunNowName => Loc.L("Jobs.ActionFor", Loc.L("Jobs.Schedule.RunNow"), Name);
+ public string EditName => Loc.L("Jobs.ActionFor", Loc.L("Jobs.Schedule.Edit"), Name);
+ public string DeleteName => Loc.L("Jobs.ActionFor", Loc.L("Jobs.Schedule.Delete"), Name);
+ public string ResetName => Loc.L("Jobs.ActionFor", Loc.L("Jobs.Schedule.Reset"), Name);
+ public string EnabledName => Loc.L("Jobs.ActionFor", Loc.L("Jobs.Schedule.Enabled"), Name);
+
+ private JobPriority Priority => JobWire.TryParsePriority(_schedule.Priority, out var priority) ? priority : JobPriority.Background;
+
+ /// A newer copy of the schedule (an edit, a run, a correction of its next run).
+ internal void Update(ScheduleDto schedule)
+ {
+ if (schedule.LastJobId != _schedule.LastJobId) _lastJob = null;
+ _schedule = schedule;
+ _isEnabled = schedule.Enabled;
+ OnAllPropertiesChanged();
+ }
+
+ /// The job the last run queued changed (or was read): the last result follows its state.
+ internal void SetLastJob(Job? job)
+ {
+ if (job is not null && job.Id != _schedule.LastJobId) return;
+ _lastJob = job;
+ OnPropertyChanged(nameof(LastJob));
+ OnPropertyChanged(nameof(LastText));
+ OnPropertyChanged(nameof(LastToolTip));
+ OnPropertyChanged(nameof(LastKind));
+ }
+
+ /// The switch goes back to the stored state (the change was refused).
+ internal void RevertEnabled()
+ {
+ _isEnabled = _schedule.Enabled;
+ OnPropertyChanged(nameof(IsEnabled));
+ OnPropertyChanged(nameof(EnabledToolTip));
+ }
+
+ internal void Refresh() => OnAllPropertiesChanged();
+}
+
+/// A job a schedule queued, in the selected schedule's last runs: kind, target, when, state, and Show in queue.
+public sealed class ScheduleRunViewModel : ObservableObject
+{
+ private Job _job;
+
+ internal ScheduleRunViewModel(Job job, Func show)
+ {
+ _job = job;
+ ShowCommand = new AsyncRelayCommand(() => show(_job.Id));
+ }
+
+ public Job Job => _job;
+ public Guid Id => _job.Id;
+
+ public string Kind => JobText.Kind(_job.Kind);
+
+ public string Target => _job.TargetLabel ?? string.Empty;
+
+ /// When the run queued it ("Today 03:00").
+ public string WhenText => ScheduleText.Moment(_job.Created);
+
+ public string StateText => JobText.State(new JobEntry(_job));
+
+ public string StateToolTip => string.Join(Loc.Separator, StateText,
+ _job.Error is { Length: > 0 } error ? error : Loc.L("Tooltips.Jobs.State." + _job.State));
+
+ public StatusKind StateKind => _job.State switch
+ {
+ JobState.Running => StatusKind.Running,
+ JobState.Queued => StatusKind.Queued,
+ JobState.Paused => StatusKind.Paused,
+ JobState.Done => StatusKind.Done,
+ JobState.Failed => StatusKind.Failed,
+ _ => StatusKind.Offline,
+ };
+
+ /// "Verify · Archive · 2024: done": the row for screen readers.
+ public string AccessibleName => Loc.L("Jobs.Row.State", JobText.Name(_job), StateText);
+
+ public string ShowName => Loc.L("Jobs.ActionFor", Loc.L("Jobs.Schedule.ShowJob"), JobText.Name(_job));
+
+ public ICommand ShowCommand { get; }
+
+ internal void Update(Job job)
+ {
+ _job = job;
+ OnAllPropertiesChanged();
+ }
+
+ internal void Refresh() => OnAllPropertiesChanged();
+}
diff --git a/src/Chronos.App/Jobs/ScheduleText.cs b/src/Chronos.App/Jobs/ScheduleText.cs
new file mode 100644
index 00000000..da74732f
--- /dev/null
+++ b/src/Chronos.App/Jobs/ScheduleText.cs
@@ -0,0 +1,187 @@
+using Chronos.App.Infrastructure;
+using Chronos.Core.Localization;
+using Chronos.Core.Model;
+using Chronos.Data.Housekeeping;
+using Chronos.Data.Scheduling;
+using Chronos.Protocol;
+using Chronos.Ui.Controls;
+
+namespace Chronos.App.Jobs;
+
+///
+/// Localized texts of schedules (Jobs › Scheduled, owner review 2, R10): names, actions, clean-up steps, when they run,
+/// their next run and what their last run did. Wire names (scan, skipped-pending, job-history) never
+/// reach the screen; an unknown one (a newer build's) is shown as it is.
+///
+public static class ScheduleText
+{
+ /// A system schedule by its key in the user's language; a user's schedule by the name they gave it.
+ public static string Name(ScheduleDto schedule)
+ {
+ ArgumentNullException.ThrowIfNull(schedule);
+ return schedule.SystemKey is { } key && SystemKeyName(key) is { } name ? Loc.L(name) : schedule.Name;
+ }
+
+ /// "Archive scan", "Index backup", …
+ public static string Action(string action) => ScheduleActions.IsKnown(action) ? Loc.L("Jobs.Schedule.Action." + Pascal(action)) : action;
+
+ /// What the action does.
+ public static string ActionToolTip(string action) =>
+ ScheduleActions.IsKnown(action) ? Loc.L("Tooltips.Jobs.Schedule.Action." + Pascal(action)) : Loc.L("Tooltips.Jobs.Schedule.Unavailable.Other");
+
+ /// Why this PC does not run an action (, or a code of the host's own).
+ public static string Unavailable(string? reason) => reason switch
+ {
+ ScheduleUnavailable.NoHandler => Loc.L("Tooltips.Jobs.Schedule.Unavailable.NoHandler"),
+ ScheduleUnavailable.Postgres => Loc.L("Tooltips.Jobs.Schedule.Unavailable.Postgres"),
+ ScheduleUnavailable.NoIndexFile => Loc.L("Tooltips.Jobs.Schedule.Unavailable.NoIndexFile"),
+ ScheduleUnavailable.ProxiesDisabled => Loc.L("Tooltips.Jobs.Schedule.Unavailable.ProxiesDisabled"),
+ _ => Loc.L("Tooltips.Jobs.Schedule.Unavailable.Other"),
+ };
+
+ /// "Job history", "Cache trim", …: a clean-up step; an unknown one by its wire name.
+ public static string Step(string step) => StepKey(step) is { } key ? Loc.L("Jobs.Schedule.Step." + key) : step;
+
+ public static string StepToolTip(string step) => StepKey(step) is { } key ? Loc.L("Tooltips.Jobs.Schedule.Step." + key) : step;
+
+ /// "Every 10 minutes", "Daily at 03:00", "Mon, Thu at 02:30", "Monthly, day 1 at 04:00".
+ public static string When(RecurrenceDto? recurrence) =>
+ ScheduleMapping.FromDto(recurrence) is { } parsed ? When(parsed) : Loc.L("Jobs.Schedule.When.Invalid");
+
+ ///
+ public static string When(ScheduleRecurrence recurrence)
+ {
+ ArgumentNullException.ThrowIfNull(recurrence);
+ return recurrence.Kind switch
+ {
+ RecurrenceKind.Every => Loc.Plural("Jobs.Schedule.When." + recurrence.Unit, recurrence.Every),
+ RecurrenceKind.Daily => Loc.L("Jobs.Schedule.When.Daily", Time(recurrence.Time)),
+ RecurrenceKind.Weekly when recurrence.Days.Count == 7 => Loc.L("Jobs.Schedule.When.Daily", Time(recurrence.Time)),
+ RecurrenceKind.Weekly => Loc.L("Jobs.Schedule.When.Weekly", Days(recurrence.Days), Time(recurrence.Time)),
+ _ => Loc.L("Jobs.Schedule.When.Monthly", recurrence.DayOfMonth, Time(recurrence.Time)),
+ };
+ }
+
+ /// "Mon, Thu": the days in the order of the week, short names of the UI language.
+ public static string Days(IEnumerable days) =>
+ days.Select(DayShort).Aggregate((a, b) => Loc.L("Jobs.Schedule.DayList", a, b));
+
+ /// "Mon" in the UI language.
+ public static string DayShort(DayOfWeek day) => Loc.Culture.DateTimeFormat.GetAbbreviatedDayName(day);
+
+ /// "Monday" in the UI language.
+ public static string DayLong(DayOfWeek day) => Loc.Culture.DateTimeFormat.GetDayName(day);
+
+ /// A wall-clock time in the UI language's short format ("03:00", "3:00 AM").
+ public static string Time(TimeOnly time) => DateTime.MinValue.Add(time.ToTimeSpan()).ToString("t", Loc.Culture);
+
+ ///
+ /// The next run as the table shows it: "Today 03:00", "Tomorrow 03:00", a date and time further away, "Off" for a
+ /// disabled schedule, "—" while it has none yet.
+ ///
+ public static string Next(DateTimeOffset? next, bool enabled)
+ {
+ if (!enabled) return Loc.L("Jobs.Schedule.Off");
+ return next is { } at ? Moment(at) : "—";
+ }
+
+ /// "Today 03:00", "Tomorrow 03:00", "Yesterday 03:00", or the short date and time.
+ public static string Moment(DateTimeOffset at)
+ {
+ var local = at.ToLocalTime();
+ var days = (local.Date - AppClock.Today).Days;
+ var time = Formatting.TimeOfDay(at);
+ return days switch
+ {
+ 0 => Loc.L("Jobs.Schedule.Today", time),
+ 1 => Loc.L("Jobs.Schedule.Tomorrow", time),
+ -1 => Loc.L("Jobs.Schedule.Yesterday", time),
+ _ => Formatting.Date(at) + " " + time,
+ };
+ }
+
+ ///
+ /// What the last run did: the state of the job it queued when that is known ("done", "failed", "running"), else the
+ /// outcome ("skipped: busy", "nothing to do", …); "never run" before the first run.
+ ///
+ public static string Outcome(string? outcome, Job? lastJob)
+ {
+ if (outcome is null) return Loc.L("Jobs.Schedule.Outcome.Never");
+ if (outcome == ScheduleOutcome.Queued && lastJob is not null) return Loc.L("Jobs.State." + lastJob.State);
+ if (ScheduleOutcome.IsFailed(outcome, out _)) return Loc.L("Jobs.Schedule.Outcome.Failed");
+ return OutcomeKey(outcome) is { } key ? Loc.L("Jobs.Schedule.Outcome." + key) : outcome;
+ }
+
+ /// The outcome explained, with when the last run was and the reason of a failure.
+ public static string OutcomeToolTip(string? outcome, DateTimeOffset? lastRun, Job? lastJob)
+ {
+ if (outcome is null || lastRun is not { } at) return Loc.L("Tooltips.Jobs.Schedule.Outcome.Never");
+ var when = Loc.L("Jobs.Schedule.LastRun", Moment(at));
+ string why;
+ if (ScheduleOutcome.IsFailed(outcome, out var reason)) why = Loc.L("Tooltips.Jobs.Schedule.Outcome.Failed", reason);
+ else if (outcome == ScheduleOutcome.Queued && lastJob is { Error: { Length: > 0 } error }) why = error;
+ else if (outcome == ScheduleOutcome.Queued && lastJob is not null) why = Loc.L("Tooltips.Jobs.State." + lastJob.State);
+ else why = OutcomeKey(outcome) is { } key ? Loc.L("Tooltips.Jobs.Schedule.Outcome." + key) : outcome;
+ return string.Join(Loc.Separator, when, why);
+ }
+
+ /// Glyph of the last result, paired with its word.
+ public static StatusKind OutcomeKind(string? outcome, Job? lastJob)
+ {
+ if (outcome is null) return StatusKind.Offline;
+ if (ScheduleOutcome.IsFailed(outcome, out _)) return StatusKind.Failed;
+ if (outcome == ScheduleOutcome.Queued && lastJob is not null)
+ {
+ return lastJob.State switch
+ {
+ JobState.Running => StatusKind.Running,
+ JobState.Queued => StatusKind.Queued,
+ JobState.Paused => StatusKind.Paused,
+ JobState.Done => StatusKind.Done,
+ JobState.Failed => StatusKind.Failed,
+ _ => StatusKind.Offline,
+ };
+ }
+ return outcome switch
+ {
+ ScheduleOutcome.Queued => StatusKind.Queued,
+ ScheduleOutcome.SkippedNothing => StatusKind.Done,
+ ScheduleOutcome.SkippedPending => StatusKind.Paused,
+ ScheduleOutcome.Unavailable => StatusKind.Warning,
+ _ => StatusKind.Offline,
+ };
+ }
+
+ /// "Background", "Normal", "High": the priority of the jobs a schedule queues.
+ public static string Priority(JobPriority priority) => Loc.L("Jobs.Schedule.Priority." + priority);
+
+ private static string? SystemKeyName(string key) => key switch
+ {
+ DesktopScheduleHost.ArchiveScan => "Jobs.Schedule.System.ArchiveScan",
+ DesktopScheduleHost.IndexBackup => "Jobs.Schedule.System.IndexBackup",
+ DesktopScheduleHost.Housekeeping => "Jobs.Schedule.System.Housekeeping",
+ _ => null,
+ };
+
+ private static string? StepKey(string step) => step switch
+ {
+ CleanupSteps.JobHistory => "JobHistory",
+ CleanupSteps.Audit => "Audit",
+ CleanupSteps.TrashReport => "TrashReport",
+ CacheTrimStep.StepName => "CacheTrim",
+ _ => null,
+ };
+
+ private static string? OutcomeKey(string outcome) => outcome switch
+ {
+ ScheduleOutcome.Queued => "Queued",
+ ScheduleOutcome.SkippedPending => "SkippedPending",
+ ScheduleOutcome.SkippedOffline => "SkippedOffline",
+ ScheduleOutcome.SkippedNothing => "SkippedNothing",
+ ScheduleOutcome.Unavailable => "Unavailable",
+ _ => null,
+ };
+
+ /// scan → Scan: the resource name of a wire name.
+ private static string Pascal(string name) => string.Concat(name.Split('-').Select(p => p.Length == 0 ? p : char.ToUpperInvariant(p[0]) + p[1..]));
+}
diff --git a/src/Chronos.App/Jobs/SchedulesViewModel.cs b/src/Chronos.App/Jobs/SchedulesViewModel.cs
new file mode 100644
index 00000000..e2349dab
--- /dev/null
+++ b/src/Chronos.App/Jobs/SchedulesViewModel.cs
@@ -0,0 +1,512 @@
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Windows.Input;
+using Chronos.App.Infrastructure;
+using Chronos.Core.Diagnostics;
+using Chronos.Core.Localization;
+using Chronos.Core.Model;
+using Chronos.Data;
+using Chronos.Data.Housekeeping;
+using Chronos.Data.Scheduling;
+using Chronos.Protocol;
+using Chronos.Ui.Mvvm;
+
+namespace Chronos.App.Jobs;
+
+///
+/// Jobs › Scheduled (owner review 2, R10): every schedule of this PC's (the system ones that stand
+/// for its timers first), each with its switch, next run and last result, kept current by the scheduler's events and by
+/// the jobs its runs queued; the selected schedule's last runs, each one shown in the queue on request; the in-window
+/// editor of a new or existing schedule. Calls to the scheduler run off the UI thread; their results and its events are
+/// applied on it. WPF-free apart from the commands: tests drive it with a scheduler of their own.
+///
+public sealed class SchedulesViewModel : LocalizedViewModel
+{
+ /// Runs listed for the selected schedule.
+ public const int RunsShown = 20;
+
+ private readonly Func _scheduler;
+ private readonly Func _database;
+ private readonly Func _confirm;
+ private readonly Action _notify;
+ private readonly Func _showJob;
+ private readonly Dictionary _rows = [];
+ private SynchronizationContext? _context;
+ private Scheduler? _attached;
+ private IReadOnlyList _actions = [];
+ private IReadOnlyList _steps = [];
+ private ScheduleRowViewModel? _selected;
+ private ScheduleEditorViewModel? _editor;
+ private bool _isLoaded;
+ private int _runsRequest;
+ private Task? _attach;
+
+ /// The running scheduler (once was told it runs).
+ /// The index, to read the jobs the runs queued.
+ /// Asks before a delete or a reset.
+ /// A toast: title, message, whether something did not happen.
+ /// Shows a job in the queue tab.
+ public SchedulesViewModel(Func scheduler, Func database, Func confirm,
+ Action notify, Func showJob)
+ {
+ _scheduler = scheduler;
+ _database = database;
+ _confirm = confirm;
+ _notify = notify;
+ _showJob = showJob;
+ NewCommand = new RelayCommand(New, () => IsRunning && _editor is null);
+ }
+
+ /// A schedule changed in a way the history text depends on (the housekeeping's job-history days).
+ public event Action? HistoryChanged;
+
+ /// System schedules first, then the user's, oldest first (the scheduler's order).
+ public ObservableCollection Rows { get; } = [];
+
+ /// The jobs the selected schedule queued, newest first.
+ public ObservableCollection Runs { get; } = [];
+
+ public ICommand NewCommand { get; }
+
+ public string NewToolTip => IsRunning ? Loc.L("Tooltips.Jobs.Schedule.New") : Loc.L("Tooltips.Jobs.Schedule.NotRunning");
+
+ /// The scheduler of this PC runs (it does not without an index, or while it failed to start).
+ public bool IsRunning => _attached is not null;
+
+ /// The schedules were read, or it is known that there are none to read.
+ public bool IsLoaded => _isLoaded;
+
+ public bool HasRows => Rows.Count > 0;
+
+ /// The empty state: the scheduler does not run here.
+ public bool IsUnavailable => _isLoaded && !IsRunning;
+
+ public ScheduleRowViewModel? Selected
+ {
+ get => _selected;
+ set
+ {
+ if (!Set(ref _selected, value)) return;
+ OnPropertyChanged(nameof(HasSelection));
+ OnPropertyChanged(nameof(RunsHeading));
+ RunsLoading = LoadRunsAsync();
+ }
+ }
+
+ public bool HasSelection => _selected is not null;
+
+ /// "Last runs · Index backup".
+ public string RunsHeading => _selected is { } row ? Loc.L("Jobs.Row.Name", Loc.L("Jobs.Schedule.Runs"), row.Name) : Loc.L("Jobs.Schedule.Runs");
+
+ public bool HasRuns => Runs.Count > 0;
+
+ public bool IsRunsEmpty => _selected is not null && Runs.Count == 0;
+
+ /// The open editor; null when none.
+ public ScheduleEditorViewModel? Editor
+ {
+ get => _editor;
+ private set
+ {
+ if (!Set(ref _editor, value)) return;
+ OnPropertyChanged(nameof(IsEditorOpen));
+ OnPropertyChanged(nameof(IsContentEnabled));
+ CommandManager.InvalidateRequerySuggested();
+ }
+ }
+
+ public bool IsEditorOpen => _editor is not null;
+
+ /// The screen behind an open editor takes neither clicks nor keyboard focus.
+ public bool IsContentEnabled => _editor is null;
+
+ /// The actions with whether this PC runs them, as last read.
+ public IReadOnlyList Actions => _actions;
+
+ /// The clean-up steps this PC's clean-up jobs run.
+ public IReadOnlyList Steps => _steps;
+
+ ///
+ /// Days of job history the housekeeping schedule keeps: its age limit while it is on and removes job history; null
+ /// while it keeps every job; the product's default before the schedules are read.
+ ///
+ public int? HistoryDays
+ {
+ get
+ {
+ if (!_isLoaded || !IsRunning) return CleanupSteps.DefaultHistoryDays;
+ var housekeeping = Rows.FirstOrDefault(r => r.Schedule.SystemKey == DesktopScheduleHost.Housekeeping)?.Schedule;
+ if (housekeeping is not { Enabled: true, Action: ScheduleActions.Cleanup } || housekeeping.Parameters.Steps?.Contains(CleanupSteps.JobHistory) != true)
+ return null;
+ return housekeeping.Parameters.OlderThanDays is > 0 and var days ? days : null;
+ }
+ }
+
+ internal Scheduler? Scheduler => _attached;
+
+ /// The last read of the selected schedule's runs (capture, tests).
+ internal Task RunsLoading { get; private set; } = Task.CompletedTask;
+
+ /// Completes once has read the schedules, or knows there are none.
+ public Task Attached => _attach ?? Task.CompletedTask;
+
+ ///
+ /// Waits for the scheduler (: true once it runs), then follows its events and reads the
+ /// schedules. Call on the UI thread, once: events are brought back to it.
+ ///
+ public Task AttachAsync(Task ready)
+ {
+ ArgumentNullException.ThrowIfNull(ready);
+ return _attach ??= AttachCoreAsync(ready);
+ }
+
+ private async Task AttachCoreAsync(Task ready)
+ {
+ _context = SynchronizationContext.Current;
+ bool running;
+ try
+ {
+ running = await ready;
+ }
+ catch (Exception ex) when (ex is not OutOfMemoryException)
+ {
+ Log.Warning("schedules", "The schedules did not start", ex);
+ running = false;
+ }
+ if (!running || _scheduler() is not { } scheduler)
+ {
+ _isLoaded = true;
+ RaiseState();
+ return;
+ }
+ _attached = scheduler;
+ scheduler.ScheduleChanged += OnScheduleChanged;
+ scheduler.ScheduleDeleted += OnScheduleDeleted;
+ await ReloadAsync();
+ }
+
+ public override void Dispose()
+ {
+ if (_attached is not null)
+ {
+ _attached.ScheduleChanged -= OnScheduleChanged;
+ _attached.ScheduleDeleted -= OnScheduleDeleted;
+ }
+ _editor?.Dispose();
+ base.Dispose();
+ }
+
+ /// Reads every schedule, the actions' availability and the jobs of the last runs again.
+ public async Task ReloadAsync()
+ {
+ if (_attached is not { } scheduler) return;
+ SchedulesDto list;
+ try
+ {
+ list = await Task.Run(() => scheduler.ListAsync());
+ }
+ catch (Exception ex) when (ex is DatabaseException or IOException or InvalidOperationException)
+ {
+ Log.Warning("schedules", "The schedules could not be read", ex);
+ _isLoaded = true;
+ RaiseState();
+ return;
+ }
+ _actions = list.Actions;
+ _steps = list.Steps ?? [];
+ var wanted = list.Items.Select(s => s.Id).ToHashSet();
+ foreach (var gone in _rows.Keys.Where(id => !wanted.Contains(id)).ToList()) Remove(gone);
+ for (var i = 0; i < list.Items.Count; i++)
+ {
+ var dto = list.Items[i];
+ if (!_rows.TryGetValue(dto.Id, out var row))
+ {
+ row = new ScheduleRowViewModel(dto, this);
+ _rows[dto.Id] = row;
+ }
+ else
+ {
+ // Every text again: the actions' availability may have changed too.
+ row.Update(dto);
+ }
+ var at = Rows.IndexOf(row);
+ if (at == i) continue;
+ if (at >= 0) Rows.Move(at, i);
+ else Rows.Insert(i, row);
+ }
+ _isLoaded = true;
+ RaiseState();
+ HistoryChanged?.Invoke();
+ foreach (var row in Rows.ToList()) await LoadLastJobAsync(row);
+ if (_selected is not null) await LoadRunsAsync();
+ }
+
+ /// A job changed (UI thread, from the Jobs screen's flush): the last result and the last runs follow it.
+ public void OnJob(Job job)
+ {
+ ArgumentNullException.ThrowIfNull(job);
+ if (job.ScheduleId is not { } id || !_rows.TryGetValue(id, out var row)) return;
+ if (row.Schedule.LastJobId == job.Id) row.SetLastJob(job);
+ if (!ReferenceEquals(_selected, row)) return;
+ if (Runs.FirstOrDefault(r => r.Id == job.Id) is { } run)
+ {
+ run.Update(job);
+ }
+ else
+ {
+ Runs.Insert(0, new ScheduleRunViewModel(job, _showJob));
+ while (Runs.Count > RunsShown) Runs.RemoveAt(Runs.Count - 1);
+ RaiseRuns();
+ }
+ }
+
+ /// Whether this PC runs (unknown until the list is read: yes).
+ public bool IsAvailable(string action) => _actions.FirstOrDefault(a => a.Name == action) is not { Available: false };
+
+ public string? UnavailableReason(string action) => _actions.FirstOrDefault(a => a.Name == action)?.Reason;
+
+ protected override void OnLanguageChanged()
+ {
+ foreach (var row in Rows) row.Refresh();
+ foreach (var run in Runs) run.Refresh();
+ HistoryChanged?.Invoke();
+ base.OnLanguageChanged();
+ }
+
+ // ---------------- Row commands ----------------
+
+ /// Runs the schedule now, as its next run would; says so when nothing was queued.
+ internal async Task RunNowAsync(ScheduleRowViewModel row)
+ {
+ if (_attached is not { } scheduler) return;
+ var run = await Call(() => scheduler.RunNowAsync(row.Id, null));
+ if (run is null)
+ {
+ await ReloadAsync();
+ return;
+ }
+ Apply(run.Schedule);
+ if (run.Outcome == ScheduleOutcome.Queued) return;
+ _notify(Loc.L("Jobs.Row.Name", row.Name, ScheduleText.Outcome(run.Outcome, null)), ScheduleText.OutcomeToolTip(run.Outcome, run.Schedule.LastRun, null),
+ ScheduleOutcome.IsFailed(run.Outcome, out _) || run.Outcome == ScheduleOutcome.Unavailable);
+ }
+
+ /// Turns a schedule on or off (its switch); a refused change puts the switch back.
+ internal async Task SetEnabledAsync(ScheduleRowViewModel row, bool enabled)
+ {
+ if (_attached is not { } scheduler) return;
+ var result = await Call(() => scheduler.UpdateAsync(row.Id, new UpdateScheduleRequest(Enabled: enabled)));
+ if (result?.Schedule is { } saved)
+ {
+ Apply(saved);
+ return;
+ }
+ row.RevertEnabled();
+ if (result is { NotFound: true }) await ReloadAsync();
+ }
+
+ internal void Edit(ScheduleRowViewModel row)
+ {
+ if (_editor is not null) return;
+ Editor = new ScheduleEditorViewModel(this, row.Schedule);
+ }
+
+ /// Deletes a schedule the user created, after asking.
+ internal async Task DeleteAsync(ScheduleRowViewModel row)
+ {
+ if (_attached is not { } scheduler || row.IsSystem) return;
+ var confirmed = _confirm(new ConfirmRequest
+ {
+ Heading = Loc.L("Jobs.Schedule.DeleteHeading", row.Name),
+ Message = Loc.L("Jobs.Schedule.DeleteMessage"),
+ SafeText = Loc.L("Jobs.Schedule.Keep"),
+ SafeToolTip = Loc.L("Tooltips.Jobs.Schedule.Keep"),
+ ActionText = Loc.L("Jobs.Schedule.Delete"),
+ ActionToolTip = Loc.L("Tooltips.Jobs.Schedule.Delete"),
+ IsDestructive = true,
+ });
+ if (!confirmed) return;
+ var outcome = await Call(() => scheduler.DeleteAsync(row.Id));
+ if (outcome is ScheduleDeleteOutcome.Deleted or ScheduleDeleteOutcome.NotFound) Remove(row.Id);
+ }
+
+ /// Puts a system schedule back to this PC's defaults, after asking.
+ internal async Task ResetAsync(ScheduleRowViewModel row)
+ {
+ if (_attached is not { } scheduler || !row.IsSystem) return;
+ var confirmed = _confirm(new ConfirmRequest
+ {
+ Heading = Loc.L("Jobs.Schedule.ResetHeading", row.Name),
+ Message = Loc.L("Jobs.Schedule.ResetMessage"),
+ SafeText = Loc.L("Jobs.Schedule.Keep"),
+ SafeToolTip = Loc.L("Tooltips.Jobs.Schedule.KeepEdits"),
+ ActionText = Loc.L("Jobs.Schedule.Reset"),
+ ActionToolTip = Loc.L("Tooltips.Jobs.Schedule.Reset"),
+ });
+ if (!confirmed) return;
+ var result = await Call(() => scheduler.ResetAsync(row.Id));
+ if (result?.Schedule is { } saved) Apply(saved);
+ else await ReloadAsync();
+ }
+
+ // ---------------- Editor ----------------
+
+ private void New()
+ {
+ if (_editor is not null || !IsRunning) return;
+ Editor = new ScheduleEditorViewModel(this, null);
+ }
+
+ /// Saves what the editor holds: a new schedule, or the fields of the one it edits.
+ internal async Task SaveAsync(ScheduleEditorViewModel editor)
+ {
+ if (_attached is not { } scheduler) return new ScheduleEditResult(null, null);
+ var result = editor.ScheduleId is { } id
+ ? await Task.Run(() => scheduler.UpdateAsync(id, editor.BuildUpdate()))
+ : await Task.Run(() => scheduler.CreateAsync(editor.BuildCreate(), null));
+ if (result.Schedule is { } saved)
+ {
+ Apply(saved);
+ if (editor.ScheduleId is null && _rows.TryGetValue(saved.Id, out var created)) Selected = created;
+ }
+ else if (result.NotFound)
+ {
+ await ReloadAsync();
+ }
+ return result;
+ }
+
+ /// Closes if it is still the open one.
+ internal void CloseEditor(ScheduleEditorViewModel editor)
+ {
+ if (!ReferenceEquals(_editor, editor)) return;
+ editor.Dispose();
+ Editor = null;
+ }
+
+ // ---------------- Events and rows ----------------
+
+ private void OnScheduleChanged(ScheduleDto schedule) => Post(() => Apply(schedule));
+
+ private void OnScheduleDeleted(Guid id) => Post(() => Remove(id));
+
+ private void Post(Action action)
+ {
+ if (_context is null || SynchronizationContext.Current == _context) action();
+ else _context.Post(_ => action(), null);
+ }
+
+ /// A schedule as the scheduler returned or announced it: its row changes, or joins the list in the scheduler's order.
+ private void Apply(ScheduleDto schedule)
+ {
+ if (_rows.TryGetValue(schedule.Id, out var row))
+ {
+ var newRun = row.Schedule.LastRun != schedule.LastRun;
+ var newJob = schedule.LastJobId is { } job && job != row.LastJob?.Id;
+ row.Update(schedule);
+ if (newJob) _ = LoadLastJobAsync(row);
+ if (newRun && ReferenceEquals(_selected, row)) RunsLoading = LoadRunsAsync();
+ }
+ else
+ {
+ row = new ScheduleRowViewModel(schedule, this);
+ _rows[schedule.Id] = row;
+ Rows.Insert(InsertionIndex(schedule), row);
+ _ = LoadLastJobAsync(row);
+ RaiseState();
+ }
+ if (schedule.SystemKey == DesktopScheduleHost.Housekeeping) HistoryChanged?.Invoke();
+ }
+
+ /// Where a new row goes: system schedules first, then by creation.
+ private int InsertionIndex(ScheduleDto schedule)
+ {
+ for (var i = 0; i < Rows.Count; i++)
+ {
+ var other = Rows[i].Schedule;
+ var before = (schedule.SystemKey is not null, other.SystemKey is not null) switch
+ {
+ (true, false) => true,
+ (false, true) => false,
+ _ => schedule.Created < other.Created,
+ };
+ if (before) return i;
+ }
+ return Rows.Count;
+ }
+
+ private void Remove(Guid id)
+ {
+ if (!_rows.Remove(id, out var row)) return;
+ Rows.Remove(row);
+ if (ReferenceEquals(_selected, row)) Selected = null;
+ RaiseState();
+ }
+
+ private async Task LoadLastJobAsync(ScheduleRowViewModel row)
+ {
+ if (row.Schedule.LastJobId is not { } id || _database() is not { } db) return;
+ try
+ {
+ row.SetLastJob(await db.Jobs.GetAsync(id));
+ }
+ catch (DatabaseException ex)
+ {
+ Log.Warning("schedules", $"The last job of schedule {row.Id} could not be read", ex);
+ }
+ }
+
+ /// The selected schedule's jobs, newest first; a later selection wins over a slower read.
+ private async Task LoadRunsAsync()
+ {
+ var request = ++_runsRequest;
+ var row = _selected;
+ IReadOnlyList jobs = [];
+ if (row is not null && _database() is { } db)
+ {
+ try
+ {
+ jobs = await db.Jobs.ListByScheduleAsync(row.Id, RunsShown);
+ }
+ catch (DatabaseException ex)
+ {
+ Log.Warning("schedules", $"The runs of schedule {row.Id} could not be read", ex);
+ }
+ }
+ if (request != _runsRequest) return;
+ Runs.Clear();
+ foreach (var job in jobs) Runs.Add(new ScheduleRunViewModel(job, _showJob));
+ RaiseRuns();
+ }
+
+ /// Runs a scheduler call off the UI thread; a failure becomes a toast and null.
+ private async Task Call(Func> call)
+ {
+ try
+ {
+ return await Task.Run(call);
+ }
+ catch (Exception ex) when (ex is DatabaseException or IOException or InvalidOperationException)
+ {
+ Log.Warning("schedules", "A schedule could not be changed", ex);
+ _notify(Loc.L("Jobs.Schedule.Failed"), ex.Message, true);
+ return default;
+ }
+ }
+
+ private void RaiseState()
+ {
+ OnPropertyChanged(nameof(IsRunning));
+ OnPropertyChanged(nameof(IsLoaded));
+ OnPropertyChanged(nameof(HasRows));
+ OnPropertyChanged(nameof(IsUnavailable));
+ OnPropertyChanged(nameof(NewToolTip));
+ CommandManager.InvalidateRequerySuggested();
+ }
+
+ private void RaiseRuns()
+ {
+ OnPropertyChanged(nameof(HasRuns));
+ OnPropertyChanged(nameof(IsRunsEmpty));
+ }
+}
diff --git a/src/Chronos.App/Sections/JobsView.xaml b/src/Chronos.App/Sections/JobsView.xaml
index 27b49ef2..d0586c09 100644
--- a/src/Chronos.App/Sections/JobsView.xaml
+++ b/src/Chronos.App/Sections/JobsView.xaml
@@ -2,229 +2,268 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="clr-namespace:Chronos.Ui.Controls;assembly=Chronos.Ui"
+ xmlns:v="clr-namespace:Chronos.Ui.Visuals;assembly=Chronos.Ui"
xmlns:l="clr-namespace:Chronos.Ui.Localization;assembly=Chronos.Ui"
xmlns:s="clr-namespace:Chronos.App.Sections"
xmlns:infra="clr-namespace:Chronos.App.Infrastructure"
xmlns:j="clr-namespace:Chronos.App.Jobs">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/Chronos.App/Sections/JobsView.xaml.cs b/src/Chronos.App/Sections/JobsView.xaml.cs
index b5f1ed2f..dbd412e4 100644
--- a/src/Chronos.App/Sections/JobsView.xaml.cs
+++ b/src/Chronos.App/Sections/JobsView.xaml.cs
@@ -1,10 +1,23 @@
+using System.ComponentModel;
+using System.Windows;
using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Threading;
+using Chronos.App.Jobs;
namespace Chronos.App.Sections;
public partial class JobsView : UserControl
{
- public JobsView() => InitializeComponent();
+ private JobsViewModel? _model;
+ private IInputElement? _beforeDialog;
+
+ public JobsView()
+ {
+ InitializeComponent();
+ DataContextChanged += OnDataContextChanged;
+ }
/// Loads older history when the list scrolls near its end.
private void OnScrollChanged(object sender, ScrollChangedEventArgs e)
@@ -12,4 +25,51 @@ public partial class JobsView : UserControl
if (DataContext is not JobsViewModel vm || e.ExtentHeight <= 0) return;
if (e.VerticalOffset + e.ViewportHeight >= e.ExtentHeight - Math.Max(e.ViewportHeight, 200)) _ = vm.LoadMoreAsync();
}
+
+ private void OnDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
+ {
+ if (_model is not null)
+ {
+ _model.RowRevealRequested -= OnRevealRequested;
+ _model.Schedules.PropertyChanged -= OnSchedulesChanged;
+ }
+ _model = e.NewValue as JobsViewModel;
+ if (_model is not null)
+ {
+ _model.RowRevealRequested += OnRevealRequested;
+ _model.Schedules.PropertyChanged += OnSchedulesChanged;
+ }
+ }
+
+ /// A job shown from Jobs › Scheduled: its row comes into view (the list is visible again by then) and takes the keyboard.
+ private void OnRevealRequested(JobRowViewModel row) =>
+ Dispatcher.BeginInvoke(DispatcherPriority.Loaded, () =>
+ {
+ JobList.ScrollIntoView(row);
+ JobList.UpdateLayout();
+ if (JobList.ItemContainerGenerator.ContainerFromItem(row) is ListBoxItem item) item.MoveFocus(new TraversalRequest(FocusNavigationDirection.First));
+ });
+
+ ///
+ /// The schedule editor takes the keyboard when it opens (its first field); when it closes, the keyboard goes back to the
+ /// control that opened it while that can still take it.
+ ///
+ private void OnSchedulesChanged(object? sender, PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName != nameof(SchedulesViewModel.Editor) || _model is not { } model) return;
+ if (model.Schedules.Editor is not null)
+ {
+ if (!IsVisible) return;
+ _beforeDialog ??= Keyboard.FocusedElement is Visual focused && IsAncestorOf(focused) ? Keyboard.FocusedElement : null;
+ Dispatcher.BeginInvoke(DispatcherPriority.Input, () => DialogHost.MoveFocus(new TraversalRequest(FocusNavigationDirection.First)));
+ return;
+ }
+ var back = _beforeDialog;
+ _beforeDialog = null;
+ if (!IsVisible) return;
+ Dispatcher.BeginInvoke(DispatcherPriority.Input, () =>
+ {
+ if (back is UIElement { IsVisible: true, IsEnabled: true, Focusable: true } element) element.Focus();
+ });
+ }
}
diff --git a/src/Chronos.App/Sections/JobsViewModel.cs b/src/Chronos.App/Sections/JobsViewModel.cs
index 5fa9cc0f..89808a01 100644
--- a/src/Chronos.App/Sections/JobsViewModel.cs
+++ b/src/Chronos.App/Sections/JobsViewModel.cs
@@ -49,10 +49,11 @@ public sealed class JobFilterChip(JobFilter filter, Action select) :
}
///
-/// Jobs (BRIEF §12.6, Jobs.html): queue and history with live progress from the engine (batched to about 10
-/// updates a second), filters, queue order, an expandable log tail per job, and the row actions. Also feeds the
-/// shell's job bar, the status strip and the rail badge (running jobs, and failures not seen on this screen yet), and
-/// raises the toast of a long operation that ends (), whichever screen started it.
+/// Jobs (BRIEF §12.6, Jobs.html), two tabs: Queue, the queue and history with live progress from the engine (batched to
+/// about 10 updates a second), filters, queue order, an expandable log tail per job, and the row actions; Scheduled
+/// (owner review 2, R10), the schedules of this PC (). Also feeds the shell's job bar, the
+/// status strip and the rail badge (running jobs, and failures not seen on this screen yet), and raises the toast of a
+/// long operation that ends (), whichever screen started it.
///
public sealed class JobsViewModel : SectionViewModel
{
@@ -77,6 +78,7 @@ public sealed class JobsViewModel : SectionViewModel
private bool _hasMore;
private bool _loading;
private bool _hasLoaded;
+ private int _tabIndex;
public JobsViewModel(ShellViewModel shell)
: base(SectionKey.Jobs, "Icon.Jobs")
@@ -94,10 +96,42 @@ public sealed class JobsViewModel : SectionViewModel
});
LoadMoreCommand = new RelayCommand(() => _ = LoadMoreAsync());
ImportCommand = new RelayCommand(() => Shell.Navigate(SectionKey.Import));
+ Schedules = new SchedulesViewModel(() => Shell.Services.Scheduler, () => Shell.Services.Database, request => Shell.Services.Dialogs.Confirm(request),
+ (title, message, isError) => Shell.Notify(title, message, isError: isError), ShowJobAsync);
+ Schedules.HistoryChanged += () => OnPropertyChanged(nameof(HistoryText));
+ Schedules.PropertyChanged += (_, e) =>
+ {
+ if (e.PropertyName is nameof(SchedulesViewModel.IsContentEnabled) or "" or null) OnPropertyChanged(nameof(IsContentEnabled));
+ };
}
+ /// A row the screen should bring into view and expand (a job shown from Jobs › Scheduled).
+ public event Action? RowRevealRequested;
+
public ShellViewModel Shell { get; }
+ /// Jobs › Scheduled.
+ public SchedulesViewModel Schedules { get; }
+
+ /// 0 = Queue, 1 = Scheduled (the segmented control's index).
+ public int TabIndex
+ {
+ get => _tabIndex;
+ set
+ {
+ if (value is < 0 or > 1 || !Set(ref _tabIndex, value)) return;
+ OnPropertyChanged(nameof(IsQueue));
+ OnPropertyChanged(nameof(IsScheduled));
+ }
+ }
+
+ public bool IsQueue => _tabIndex == 0;
+
+ public bool IsScheduled => _tabIndex == 1;
+
+ /// The screen behind the schedule editor takes neither clicks nor keyboard focus.
+ public bool IsContentEnabled => Schedules.IsContentEnabled;
+
/// Rows in display order for the current filter and search.
public ObservableCollection Rows { get; } = [];
@@ -141,8 +175,8 @@ public sealed class JobsViewModel : SectionViewModel
/// The priority queue of Settings › Rendering is on: higher jobs pause the running one.
public bool IsPriorityQueueOn => HasEngine && Shell.Services.Settings.PriorityQueue;
- /// "History keeps 90 days": the job-history step of the housekeeping schedule.
- public string HistoryText => Loc.Plural("Jobs.History", (long)Chronos.Data.Housekeeping.CleanupSteps.DefaultHistoryDays);
+ /// "History keeps 90 days": the age limit of the housekeeping schedule's job-history step; "Full history kept" without one.
+ public string HistoryText => Schedules.HistoryDays is { } days ? Loc.Plural("Jobs.History", days) : Loc.L("Jobs.HistoryKept");
public bool IsEmpty => _hasLoaded && Rows.Count == 0;
@@ -154,9 +188,11 @@ public sealed class JobsViewModel : SectionViewModel
private DateTimeOffset? ClearedAt => Shell.Services.Settings.JobsClearedAt;
- /// Subscribes to the engine and loads the first page of jobs.
+ /// Subscribes to the engine and loads the first page of jobs; the Scheduled tab follows the schedules once they run.
public void Attach()
{
+ // Without an index the Scheduled tab says the schedules do not run.
+ _ = Schedules.AttachAsync(Shell.Services.SchedulerReady);
_queue = Shell.Services.Jobs;
if (_queue is null)
{
@@ -178,6 +214,7 @@ public sealed class JobsViewModel : SectionViewModel
_queue.Progress -= OnProgress;
}
_throttle?.Dispose();
+ Schedules.Dispose();
base.Dispose();
}
@@ -234,6 +271,7 @@ public sealed class JobsViewModel : SectionViewModel
var before = _model[job.Id]?.State;
_model.Apply(job);
Follow(before, job);
+ Schedules.OnJob(job);
}
foreach (var p in progress) _model.Apply(p);
foreach (var ending in _endings.Take(_model.IsBusy)) Shell.ShowToast(ToastFor(ending));
@@ -344,6 +382,38 @@ public sealed class JobsViewModel : SectionViewModel
private void SelectFilter(JobFilter filter) => Filter = filter;
+ ///
+ /// Shows a job in the Queue tab (from a schedule's last runs): every filter off, its row read when the list has not
+ /// loaded it yet, expanded with its log, and brought into view.
+ ///
+ internal async Task ShowJobAsync(Guid jobId)
+ {
+ TabIndex = 0;
+ Filter = JobFilter.All;
+ SearchText = string.Empty;
+ if (_model[jobId] is null && _queue is not null)
+ {
+ var stamp = _model.Stamp;
+ try
+ {
+ if (await _queue.GetAsync(jobId) is { } job) _model.ApplyLoaded(job, stamp);
+ }
+ catch (DatabaseException ex)
+ {
+ Log.Warning("jobs", $"Job {jobId} could not be read", ex);
+ }
+ SyncRows();
+ }
+ if (!_rows.TryGetValue(jobId, out var row) || !Rows.Contains(row))
+ {
+ // Hidden by Clear done: the history keeps it, the list no longer shows it.
+ Shell.Notify(Loc.L("Jobs.Schedule.JobHidden"), Loc.L("Tooltips.Jobs.Schedule.JobHidden"));
+ return;
+ }
+ row.IsExpanded = true;
+ RowRevealRequested?.Invoke(row);
+ }
+
/// Brings to the model's order with moves (rows keep their expanded log).
private void SyncRows()
{
diff --git a/src/Chronos.App/Sections/SchedulesView.xaml b/src/Chronos.App/Sections/SchedulesView.xaml
new file mode 100644
index 00000000..c20facc1
--- /dev/null
+++ b/src/Chronos.App/Sections/SchedulesView.xaml
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Chronos.App/Sections/SchedulesView.xaml.cs b/src/Chronos.App/Sections/SchedulesView.xaml.cs
new file mode 100644
index 00000000..545ccf06
--- /dev/null
+++ b/src/Chronos.App/Sections/SchedulesView.xaml.cs
@@ -0,0 +1,9 @@
+using System.Windows.Controls;
+
+namespace Chronos.App.Sections;
+
+/// Jobs › Scheduled: the view of .
+public partial class SchedulesView : UserControl
+{
+ public SchedulesView() => InitializeComponent();
+}
diff --git a/src/Chronos.App/Sections/SettingsView.xaml b/src/Chronos.App/Sections/SettingsView.xaml
index 558bf666..07f1b56c 100644
--- a/src/Chronos.App/Sections/SettingsView.xaml
+++ b/src/Chronos.App/Sections/SettingsView.xaml
@@ -192,10 +192,6 @@
-
-
-
diff --git a/src/Chronos.App/Sections/SettingsViewModel.cs b/src/Chronos.App/Sections/SettingsViewModel.cs
index 77cb6824..f7207c16 100644
--- a/src/Chronos.App/Sections/SettingsViewModel.cs
+++ b/src/Chronos.App/Sections/SettingsViewModel.cs
@@ -73,7 +73,7 @@ public sealed class SettingsViewModel : SectionViewModel
new(SettingsPage.General, ["Settings.General.Language", "Settings.General.Theme", .. ShowsStartup ? (string[])["Settings.General.Startup"] : [],
"Settings.General.Notifications", .. ProductFeatures.AdsEnabled ? (string[])["Settings.General.Usage"] : []]),
new(SettingsPage.Archive, ["Settings.Archive.Root", "Settings.Archive.Folders", "Settings.Archive.Files", "Settings.Archive.Proxies",
- "Settings.Archive.Thumbnails", "Settings.Archive.Polling"]),
+ "Settings.Archive.Thumbnails"]),
new(SettingsPage.Import, ["Import.Scan.Sessions", "Import.Label.Scan", "Import.Scan.Subfolders", "Import.Scan.Verify", "Import.Label.Duplicates",
"Import.Label.After", "Import.After.Eject"]),
new(SettingsPage.Analysis, ["Settings.Analysis.Width", "Settings.Analysis.Night", "Settings.Analysis.Stars", "Settings.Analysis.Deep"]),
@@ -440,23 +440,6 @@ public sealed class SettingsViewModel : SectionViewModel
}
}
- public IReadOnlyList> ScanIntervals =>
- [.. new[] { 5, 10, 15, 30, 60 }.Select(m => new SettingsOption(m, Formatting.Duration(TimeSpan.FromMinutes(m))))];
-
- /// How often this PC rescans the open archive for changes made elsewhere (BRIEF §7: polling).
- public SettingsOption SelectedScanInterval
- {
- get => ScanIntervals.FirstOrDefault(p => p.Value == _s.ScanIntervalMinutes) ?? ScanIntervals[1];
- set
- {
- if (value is null || value.Value == _s.ScanIntervalMinutes) return;
- _s.ScanIntervalMinutes = value.Value;
- // Saving applies it: the running rescan timer takes the new period.
- Save();
- OnPropertyChanged();
- }
- }
-
// ---------------- Import ----------------
public EditableField SessionGap { get; }
@@ -1527,7 +1510,6 @@ public sealed class SettingsViewModel : SectionViewModel
_s.FileTemplate = defaults.FileTemplate;
_s.ProxyLongEdge = defaults.ProxyLongEdge;
_s.ThumbnailLongEdge = defaults.ThumbnailLongEdge;
- _s.ScanIntervalMinutes = defaults.ScanIntervalMinutes;
FolderTemplate.Load(_s.FolderTemplate);
FileTemplate.Load(_s.FileTemplate);
UpdatePreview();
diff --git a/src/Chronos.App/Shell/ScreenCapture.cs b/src/Chronos.App/Shell/ScreenCapture.cs
index b9fc2cfa..cb1fc1ec 100644
--- a/src/Chronos.App/Shell/ScreenCapture.cs
+++ b/src/Chronos.App/Shell/ScreenCapture.cs
@@ -70,6 +70,9 @@ public static class ScreenCapture
await sample.FillAsync();
await shell.Library.RefreshAsync();
await shell.Jobs.ReloadAsync();
+ // The sample wrote its schedules into the index, past the scheduler's events.
+ await shell.Jobs.Schedules.Attached;
+ await shell.Jobs.Schedules.ReloadAsync();
await shell.Services.Server.RestoreAsync();
await shell.Services.Sync.RefreshAsync();
await shell.Server.Sync.ReloadAsync();
@@ -103,6 +106,7 @@ public static class ScreenCapture
shell.Navigate(SectionKey.Jobs);
if (shell.Jobs.Rows.Count > 0) shell.Jobs.Rows[0].IsExpanded = true;
written += await SaveAsync(window, directory, "jobs", theme);
+ written += await CaptureSchedulesAsync(window, shell, directory, theme);
shell.Navigate(SectionKey.Server);
written += await SaveAsync(window, directory, "server", theme);
@@ -195,6 +199,29 @@ public static class ScreenCapture
return written;
}
+ ///
+ /// jobs-scheduled (owner review 2, R10: the Scheduled tab with the weekly integrity check selected and its last
+ /// run) and jobs-schedule-editor (that schedule in the editor), then the Queue tab again.
+ ///
+ private static async Task CaptureSchedulesAsync(MainWindow window, ShellViewModel shell, string directory, AppTheme theme)
+ {
+ var schedules = shell.Jobs.Schedules;
+ shell.Jobs.TabIndex = 1;
+ var written = 0;
+ if ((schedules.Rows.FirstOrDefault(r => !r.IsSystem && r.IsEnabled) ?? schedules.Rows.FirstOrDefault()) is { } row)
+ {
+ schedules.Selected = row;
+ await schedules.RunsLoading;
+ written += await SaveAsync(window, directory, "jobs-scheduled", theme);
+ row.EditCommand.Execute(null);
+ written += await SaveAsync(window, directory, "jobs-schedule-editor", theme);
+ schedules.Editor?.CloseCommand.Execute(null);
+ schedules.Selected = null;
+ }
+ shell.Jobs.TabIndex = 0;
+ return written;
+ }
+
private static void SelectSyncFilter(ShellViewModel shell, SyncFilter filter) =>
shell.Server.Sync.Chips.First(c => c.Filter == filter).SelectCommand.Execute(null);
diff --git a/src/Chronos.App/Shell/SectionTemplates.xaml b/src/Chronos.App/Shell/SectionTemplates.xaml
index 59e83aa5..3a66caf2 100644
--- a/src/Chronos.App/Shell/SectionTemplates.xaml
+++ b/src/Chronos.App/Shell/SectionTemplates.xaml
@@ -1,12 +1,15 @@
+ xmlns:s="clr-namespace:Chronos.App.Sections"
+ xmlns:j="clr-namespace:Chronos.App.Jobs">
+
+
diff --git a/tests/Chronos.App.Tests/Infrastructure/AppServicesTests.cs b/tests/Chronos.App.Tests/Infrastructure/AppServicesTests.cs
index 4644a9e1..88adc174 100644
--- a/tests/Chronos.App.Tests/Infrastructure/AppServicesTests.cs
+++ b/tests/Chronos.App.Tests/Infrastructure/AppServicesTests.cs
@@ -1,9 +1,11 @@
using System.IO;
using Chronos.App.Infrastructure;
+using Chronos.App.Jobs;
using Chronos.App.Tests.Uploader;
using Chronos.Core.Model;
using Chronos.Data;
using Chronos.Data.Archiving;
+using Chronos.Data.Scheduling;
using Chronos.Testing;
namespace Chronos.App.Tests.Infrastructure;
@@ -21,7 +23,7 @@ public sealed class AppServicesTests
[Test]
[WindowsOnly]
- public void ExitStopsPollingAndTheEngineWhileTheUiThreadWaits()
+ public void ExitStopsTheSchedulesAndTheEngineWhileTheUiThreadWaits()
{
var environment = AppEnvironment.ForCapture();
try
@@ -33,7 +35,10 @@ public sealed class AppServicesTests
await new ArchiveService(setup).CreateAsync(root, "Exit");
var services = new AppServices(environment, new AppSettings { Language = "en", LastArchivePath = root }, () => { }, new NoDialogs());
await services.OpenAsync(environment.DatabasePath);
- // The archive was reopened and its first rescan queued: polling now waits for the next one.
+ // The archive was reopened, then the schedules started (owner review 2, R10): its scan schedule queues a scan of it.
+ Assert.True(await services.SchedulerReady, "the schedules started");
+ var scan = Assert.NotNull(await services.Database!.Schedules.GetBySystemKeyAsync(DesktopScheduleHost.ArchiveScan));
+ Assert.Equal(ScheduleOutcome.Queued, (await services.Scheduler!.RunNowAsync(scan.Id, null))?.Outcome);
var until = DateTime.UtcNow + TimeSpan.FromSeconds(30);
while ((await services.Database!.Jobs.ListAsync(null, JobKind.Scan)).Items.Count == 0)
{
@@ -51,10 +56,13 @@ public sealed class AppServicesTests
}
}
- /// BRIEF §7: polling follows the archive folder, also one chosen after the start (first run, Settings, relink).
+ ///
+ /// BRIEF §7, owner review 2 R10: the scheduled scans follow the archive folder, also one chosen after the start (first
+ /// run, Settings, relink).
+ ///
[Test]
[WindowsOnly]
- public void RescansFollowTheArchiveFolderChosenAfterTheStart()
+ public void ScheduledScansFollowTheArchiveFolderChosenAfterTheStart()
{
var environment = AppEnvironment.ForCapture();
try
@@ -67,20 +75,21 @@ public sealed class AppServicesTests
try
{
await services.OpenAsync(environment.DatabasePath);
- Assert.Null(await services.RescanAsync());
- // The rescans run all the same: Settings › Archive › Rescan every reaches them.
- settings.ScanIntervalMinutes = 30;
- services.SaveSettings();
- Assert.Equal(TimeSpan.FromMinutes(30), services.PollingPeriod);
+ Assert.True(await services.SchedulerReady, "the schedules started");
+ Assert.Null(await services.ScheduleHost.GetArchiveAsync(default));
+ // The scans run all the same, on the schedule seeded from the former Settings › Archive › Rescan every.
+ var scan = Assert.NotNull(await services.Database!.Schedules.GetBySystemKeyAsync(DesktopScheduleHost.ArchiveScan));
+ Assert.Equal("every:10m", scan.Recurrence);
+ Assert.Equal(ScheduleOutcome.SkippedOffline, (await services.Scheduler!.RunNowAsync(scan.Id, null))?.Outcome);
- // The first-run dialog creates an archive: the next rescan is of it.
+ // The first-run dialog creates an archive: the schedules work on it.
var firstRoot = Path.Combine(environment.DataDirectory, "first");
await services.ArchiveSetup.CreateAsync(firstRoot);
- var first = Assert.NotNull(await services.RescanAsync());
+ var first = Assert.NotNull(await services.ScheduleHost.GetArchiveAsync(default));
Assert.Equal("first", first.Name);
- // Settings › Archive moves to another archive, which the index lists after the first one: the next rescan
- // is of the archive at the folder, no longer of the first one.
+ // Settings › Archive moves to another archive, which the index lists after the first one: the next scheduled
+ // scan is of the archive at the folder, no longer of the first one.
var other = Path.Combine(environment.DataDirectory, "zeta");
await new ArchiveService(services.Database!).CreateAsync(other, "zeta");
Assert.Equal("first", (await services.Database!.Archives.ListAsync())[0].Name);
@@ -89,15 +98,16 @@ public sealed class AppServicesTests
var scansOfFirst = await ScansOfAsync(first.Id);
settings.LastArchivePath = other;
services.SaveSettings();
- var rescanned = Assert.NotNull(await services.RescanAsync());
+ var rescanned = Assert.NotNull(await services.ScheduleHost.GetArchiveAsync(default));
Assert.Equal("zeta", rescanned.Name);
+ Assert.Equal(ScheduleOutcome.Queued, (await services.Scheduler.RunNowAsync(scan.Id, null))?.Outcome);
Assert.True(await ScansOfAsync(rescanned.Id) > 0, "the archive at the folder is rescanned");
Assert.Equal(scansOfFirst, await ScansOfAsync(first.Id));
// And back: the folder decides, whatever the order of the index.
settings.LastArchivePath = firstRoot;
services.SaveSettings();
- Assert.Equal(first.Id, (await services.RescanAsync())?.Id);
+ Assert.Equal(first.Id, (await services.ScheduleHost.GetArchiveAsync(default))?.Id);
}
finally
{
diff --git a/tests/Chronos.App.Tests/Infrastructure/CacheStoreTests.cs b/tests/Chronos.App.Tests/Infrastructure/CacheStoreTests.cs
new file mode 100644
index 00000000..1e289778
--- /dev/null
+++ b/tests/Chronos.App.Tests/Infrastructure/CacheStoreTests.cs
@@ -0,0 +1,77 @@
+using System.IO;
+using Chronos.App.Infrastructure;
+using Chronos.App.Jobs;
+using Chronos.Testing;
+
+namespace Chronos.App.Tests.Infrastructure;
+
+/// Owner review 2, R10: the housekeeping trims the cache to its limit, oldest files first, never what is in use or kept whole.
+public sealed class CacheStoreTests(TestContext context)
+{
+ private static readonly DateTime Start = new(2026, 9, 1, 8, 0, 0, DateTimeKind.Utc);
+
+ /// A cache file of last written days after .
+ private static string Write(string folder, string name, int bytes, int day)
+ {
+ var path = Path.Combine(folder, name);
+ Directory.CreateDirectory(Path.GetDirectoryName(path)!);
+ File.WriteAllBytes(path, new byte[bytes]);
+ File.SetLastWriteTimeUtc(path, Start.AddDays(day));
+ return path;
+ }
+
+ [Test]
+ public void TheOldestFilesGoFirstUntilTheCacheFits()
+ {
+ var cache = context.CreateTempDirectory("cache");
+ CacheStore.Prepare(cache);
+ var oldest = Write(cache, "spill-1.bin", 400, 1);
+ var older = Write(cache, Path.Combine("render", "spill-2.bin"), 400, 2);
+ var recent = Write(cache, "spill-3.bin", 400, 3);
+ var size = CacheStore.Size(cache);
+
+ var result = Assert.NotNull(CacheStore.Trim(cache, size - 500));
+
+ // 400 bytes were not enough: the two oldest went, the newest and the marker stay.
+ Assert.Equal((size, 800L, 2), (result.Before, result.Freed, result.Deleted));
+ Assert.Equal(size - 800, result.After);
+ Assert.False(File.Exists(oldest));
+ Assert.False(File.Exists(older));
+ Assert.True(File.Exists(recent));
+ Assert.True(CacheStore.IsOwned(cache), "the marker stays");
+
+ // Within the limit: nothing to do.
+ Assert.Equal(0, CacheStore.Trim(cache, 1L << 30)!.Deleted);
+ }
+
+ [Test]
+ public void FilesInUseAndKeptFoldersStay()
+ {
+ var cache = context.CreateTempDirectory("cache");
+ CacheStore.Prepare(cache);
+ var proxies = Write(cache, Path.Combine("proxies", "server", "sequence", "frame.jpg"), 1000, 0);
+ var busy = Write(cache, "spill-busy.bin", 1000, 1);
+ var free = Write(cache, "spill-free.bin", 1000, 2);
+
+ using (new FileStream(busy, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ var result = Assert.NotNull(CacheStore.Trim(cache, 0, CacheTrimStep.Kept));
+ Assert.Equal((1000L, 1), (result.Freed, result.Deleted));
+ }
+
+ Assert.True(File.Exists(proxies), "a kept folder is never trimmed");
+ Assert.True(File.Exists(busy), "a file in use is skipped");
+ Assert.False(File.Exists(free));
+ }
+
+ [Test]
+ public void AFolderChronosDidNotMakeIsLeftAlone()
+ {
+ var folder = context.CreateTempDirectory("photos");
+ var photo = Write(folder, "IMG_0001.JPG", 1000, 0);
+
+ Assert.Null(CacheStore.Trim(folder, 0));
+ Assert.True(File.Exists(photo));
+ Assert.Equal((0L, 0L, 0), CacheStore.Trim(Path.Combine(folder, "missing"), 0) is { } none ? (none.Before, none.Freed, none.Deleted) : (-1L, -1L, -1));
+ }
+}
diff --git a/tests/Chronos.App.Tests/Jobs/DesktopScheduleHostTests.cs b/tests/Chronos.App.Tests/Jobs/DesktopScheduleHostTests.cs
new file mode 100644
index 00000000..a04ede60
--- /dev/null
+++ b/tests/Chronos.App.Tests/Jobs/DesktopScheduleHostTests.cs
@@ -0,0 +1,119 @@
+using System.IO;
+using Chronos.App.Infrastructure;
+using Chronos.App.Jobs;
+using Chronos.Core.Model;
+using Chronos.Data;
+using Chronos.Data.Housekeeping;
+using Chronos.Data.Scheduling;
+using Chronos.Protocol;
+using Chronos.Testing;
+
+namespace Chronos.App.Tests.Jobs;
+
+///
+/// Owner review 2, R10: the desktop's timers became visible system schedules: the archive scan (seeded once from the
+/// former Rescan every setting), the index backup that replaced the daily backup loop, and the housekeeping with the cache
+/// trim; the schedules work on the archive at Settings › Archive's folder while it is online.
+///
+public sealed class DesktopScheduleHostTests(TestContext context)
+{
+ [Test]
+ public async Task TheScanScheduleIsSeededOnceFromTheFormerRescanInterval()
+ {
+ var settings = new AppSettings { Language = "en", ScanIntervalMinutes = 30, DeepAnalysisAfterScan = true };
+ await using var fx = await ScheduleFixture.CreateAsync(context, settings);
+ var scheduler = await fx.StartAsync();
+
+ var scan = Assert.NotNull(await fx.Db.Schedules.GetBySystemKeyAsync(DesktopScheduleHost.ArchiveScan));
+ Assert.Equal(("every:30m", false, JobPriority.Background, true, ScheduleActions.Scan), (scan.Recurrence, scan.CatchUp, scan.Priority, scan.Enabled, scan.Action));
+ Assert.Equal(true, ScheduleMapping.Parameters(scan).Deep);
+ Assert.Equal(fx.Clock.Now.AddMinutes(30), scan.NextRun);
+
+ // The user edits the schedule in Jobs › Scheduled; the old setting changes (or never changes again): the next
+ // start keeps the schedule as it is.
+ Assert.Null((await scheduler.UpdateAsync(scan.Id, new UpdateScheduleRequest(Recurrence: new("every", Every: 2, Unit: "hours")))).Problem);
+ settings.ScanIntervalMinutes = 5;
+ await fx.StartAsync();
+ var kept = Assert.NotNull(await fx.Db.Schedules.GetBySystemKeyAsync(DesktopScheduleHost.ArchiveScan));
+ Assert.Equal((scan.Id, "every:2h"), (kept.Id, kept.Recurrence));
+ Assert.Count(3, (await fx.Db.Schedules.ListAsync()).Where(s => s.IsSystem));
+
+ // Reset goes back to what the host seeds with.
+ Assert.Null((await fx.Scheduler!.ResetAsync(scan.Id)).Problem);
+ Assert.Equal("every:5m", (await fx.Db.Schedules.GetAsync(scan.Id))!.Recurrence);
+ }
+
+ [Test]
+ public void TheFormerIntervalIsClampedToWhatAnIntervalAccepts()
+ {
+ Assert.Equal(ScheduleRecurrence.MinMinutes, DesktopScheduleHost.ScanMinutes(new AppSettings { ScanIntervalMinutes = 1 }));
+ Assert.Equal(AppSettings.DefaultScanIntervalMinutes, DesktopScheduleHost.ScanMinutes(new AppSettings()));
+ Assert.Equal(ScheduleRecurrence.MaxMinutes, DesktopScheduleHost.ScanMinutes(new AppSettings { ScanIntervalMinutes = 100_000 }));
+ }
+
+ [Test]
+ public async Task TheBackupScheduleReplacesTheDailyBackupLoop()
+ {
+ await using var fx = await ScheduleFixture.CreateAsync(context);
+ var scheduler = await fx.StartAsync();
+ var backup = Assert.NotNull(await fx.Db.Schedules.GetBySystemKeyAsync(DesktopScheduleHost.IndexBackup));
+ Assert.Equal(("every:1d", true, JobPriority.Background, ScheduleActions.Backup), (backup.Recurrence, backup.CatchUp, backup.Priority, backup.Action));
+ Assert.Equal(DatabaseBackups.Keep, ScheduleMapping.Parameters(backup).Keep);
+ Assert.Equal(fx.Clock.Now.AddDays(1), backup.NextRun);
+
+ // Chronos was closed for two days: the missed copy is made once at start (catch-up, as the housekeeping's run; the
+ // scan has none and just moves on).
+ fx.Clock.Advance(TimeSpan.FromDays(2.5));
+ Assert.Equal(2, await scheduler.RunDueAsync());
+ var job = (await fx.Db.Jobs.ListByScheduleAsync(backup.Id)).Single();
+ Assert.Equal((JobKind.Backup, JobPriority.Background, JobState.Queued), (job.Kind, job.Priority, job.State));
+ Assert.Equal(0, await scheduler.RunDueAsync());
+
+ // The engine makes the copy in the backups folder next to the index, as the loop did.
+ await fx.Engine.StartAsync();
+ var until = DateTime.UtcNow + TimeSpan.FromSeconds(30);
+ while ((await fx.Db.Jobs.GetAsync(job.Id))!.State is JobState.Queued or JobState.Running)
+ {
+ Assert.True(DateTime.UtcNow < until, "the backup job did not finish");
+ await Task.Delay(50);
+ }
+ Assert.Equal(JobState.Done, (await fx.Db.Jobs.GetAsync(job.Id))!.State);
+ Assert.Count(1, DatabaseBackups.List(fx.Backups, fx.DatabasePath));
+ }
+
+ [Test]
+ public async Task TheHousekeepingRemovesOldHistoryAndTrimsTheCache()
+ {
+ await using var fx = await ScheduleFixture.CreateAsync(context);
+ await fx.StartAsync();
+ var housekeeping = Assert.NotNull(await fx.Db.Schedules.GetBySystemKeyAsync(DesktopScheduleHost.Housekeeping));
+ Assert.Equal(("daily:04:00", true, ScheduleActions.Cleanup), (housekeeping.Recurrence, housekeeping.CatchUp, housekeeping.Action));
+ var parameters = ScheduleMapping.Parameters(housekeeping);
+ Assert.SequenceEqual([CleanupSteps.JobHistory, CacheTrimStep.StepName], parameters.Steps!);
+ Assert.Equal(CleanupSteps.DefaultHistoryDays, parameters.OlderThanDays);
+ // The host's step is one the clean-up jobs run, after the shared ones.
+ Assert.SequenceEqual([CleanupSteps.JobHistory, CleanupSteps.Audit, CleanupSteps.TrashReport, CacheTrimStep.StepName], fx.Host.CleanupSteps);
+ Assert.Equal(ScheduleRecurrence.DailyAt(new TimeOnly(4, 0)).Next(fx.Clock.Now, TimeZoneInfo.Utc), housekeeping.NextRun);
+ }
+
+ [Test]
+ public async Task SchedulesWorkOnTheArchiveAtTheFolderWhileItIsOnline()
+ {
+ await using var fx = await ScheduleFixture.CreateAsync(context);
+ Assert.Null(await fx.Host.GetArchiveAsync(context.Cancellation));
+ var first = await fx.Archives.CreateAsync(Path.Combine(fx.Folder, "first"), "first");
+ var other = await fx.Archives.CreateAsync(Path.Combine(fx.Folder, "other"), "other");
+
+ // No folder chosen: the first archive of the index; then the one at the folder.
+ Assert.Equal(first.Id, (await fx.Host.GetArchiveAsync(context.Cancellation))?.Id);
+ fx.Settings.LastArchivePath = other.RootPath;
+ Assert.Equal(other.Id, (await fx.Host.GetArchiveAsync(context.Cancellation))?.Id);
+
+ // Unplugged: none, so the runs that need it are skipped (and the scheduler logs it) until it is back.
+ var moved = other.RootPath + "-away";
+ Directory.Move(other.RootPath, moved);
+ Assert.Null(await fx.Host.GetArchiveAsync(context.Cancellation));
+ Directory.Move(moved, other.RootPath);
+ Assert.Equal(other.Id, (await fx.Host.GetArchiveAsync(context.Cancellation))?.Id);
+ }
+}
diff --git a/tests/Chronos.App.Tests/Jobs/JobNoticesTests.cs b/tests/Chronos.App.Tests/Jobs/JobNoticesTests.cs
index 43d83fd8..aa6f02a1 100644
--- a/tests/Chronos.App.Tests/Jobs/JobNoticesTests.cs
+++ b/tests/Chronos.App.Tests/Jobs/JobNoticesTests.cs
@@ -142,6 +142,44 @@ public sealed class JobNoticesTests
Assert.Empty(endings.Take(model.IsBusy));
}
+ /// Owner review 2, R10: a schedule's background run is said only when it fails, unless the next run repeats it anyway.
+ [Theory]
+ [Case(JobKind.Backup)]
+ [Case(JobKind.Verify)]
+ [Case(JobKind.Maintenance)]
+ [Case(JobKind.Duplicates)]
+ [Case(JobKind.DeepAnalyse)]
+ public void AScheduledBackgroundRunIsSaidOnlyWhenItFails(JobKind kind)
+ {
+ var schedule = Guid.CreateVersion7();
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Running, Job(kind, JobState.Done, JobPriority.Background) with { ScheduleId = schedule }));
+ Assert.Equal(JobNotice.Failed, JobNotices.For(JobState.Running, Job(kind, JobState.Failed, JobPriority.Background) with { ScheduleId = schedule }));
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Failed, Job(kind, JobState.Failed, JobPriority.Background) with { ScheduleId = schedule }));
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Running, Job(kind, JobState.Cancelled, JobPriority.Background) with { ScheduleId = schedule }));
+ // The same work queued in the background by something else stays silent.
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Running, Job(kind, JobState.Failed, JobPriority.Background)));
+ }
+
+ [Theory]
+ [Case(JobKind.Scan)]
+ [Case(JobKind.Thumbs)]
+ [Case(JobKind.Proxies)]
+ [Case(JobKind.LightAnalyse)]
+ [Case(JobKind.Cleanup)]
+ public void AScheduledUpkeepRunEndsSilently(JobKind kind)
+ {
+ var schedule = Guid.CreateVersion7();
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Running, Job(kind, JobState.Done, JobPriority.Background) with { ScheduleId = schedule }));
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Running, Job(kind, JobState.Failed, JobPriority.Background) with { ScheduleId = schedule }));
+ }
+
+ [Test]
+ public void AScheduledRunAtAHigherPriorityIsSaidAsAnyOther()
+ {
+ var verify = Job(JobKind.Verify, JobState.Done, JobPriority.Normal) with { ScheduleId = Guid.CreateVersion7() };
+ Assert.Equal(JobNotice.Done, JobNotices.For(JobState.Running, verify));
+ }
+
private static Job Job(JobKind kind, JobState state, JobPriority priority = JobPriority.User) => new()
{
Id = Guid.CreateVersion7(),
diff --git a/tests/Chronos.App.Tests/Jobs/ScheduleFixture.cs b/tests/Chronos.App.Tests/Jobs/ScheduleFixture.cs
new file mode 100644
index 00000000..cd048841
--- /dev/null
+++ b/tests/Chronos.App.Tests/Jobs/ScheduleFixture.cs
@@ -0,0 +1,97 @@
+using System.IO;
+using Chronos.App.Infrastructure;
+using Chronos.App.Jobs;
+using Chronos.Data;
+using Chronos.Data.Archiving;
+using Chronos.Data.Jobs;
+using Chronos.Data.Scheduling;
+using Chronos.Testing;
+
+namespace Chronos.App.Tests.Jobs;
+
+/// A clock the test moves by hand; its timers are the system's.
+internal sealed class ManualClock(DateTimeOffset start) : TimeProvider
+{
+ private long _ticks = start.UtcTicks;
+
+ public DateTimeOffset Now => GetUtcNow();
+
+ public override DateTimeOffset GetUtcNow() => new(Interlocked.Read(ref _ticks), TimeSpan.Zero);
+
+ public void Advance(TimeSpan by) => Interlocked.Add(ref _ticks, by.Ticks);
+}
+
+///
+/// The desktop's schedules as composes them, without the shell: an SQLite index file, the archive
+/// engine with the cache-trim step and a backups folder, a job engine that is not started (queued jobs stay queued), and a
+/// on with a clock the test moves.
+///
+internal sealed class ScheduleFixture : IAsyncDisposable
+{
+ public static readonly DateTimeOffset T0 = new(2026, 10, 2, 9, 0, 0, TimeSpan.Zero);
+
+ private ScheduleFixture(TestContext context, AppSettings settings, ChronosDatabase db, string folder)
+ {
+ Context = context;
+ Settings = settings;
+ Db = db;
+ Folder = folder;
+ Cache = Path.Combine(folder, "cache");
+ Backups = Path.Combine(folder, DatabaseBackups.DirectoryName);
+ Archives = new ArchiveService(db, new ArchiveServiceOptions
+ {
+ Owner = "test",
+ CleanupSteps = [new CacheTrimStep(() => Cache, () => CacheLimitBytes)],
+ BackupDirectory = Backups,
+ });
+ Engine = new JobEngine(db, Archives.CreateJobHandlers(), new JobEngineOptions { WorkerId = "test", PollInterval = TimeSpan.FromMilliseconds(100) });
+ Host = new DesktopScheduleHost(settings, () => Db, () => Archives) { TimeZone = TimeZoneInfo.Utc };
+ }
+
+ public TestContext Context { get; }
+ public AppSettings Settings { get; }
+ public ChronosDatabase Db { get; }
+ public string Folder { get; }
+ public string Cache { get; }
+ public string Backups { get; }
+ public long CacheLimitBytes { get; set; } = 1L << 30;
+ public ArchiveService Archives { get; }
+ public JobEngine Engine { get; }
+ public DesktopScheduleHost Host { get; }
+ public ManualClock Clock { get; } = new(T0);
+ public Scheduler? Scheduler { get; private set; }
+
+ public string DatabasePath => Path.Combine(Folder, "chronos.db");
+
+ public static async Task CreateAsync(TestContext context, AppSettings? settings = null)
+ {
+ var folder = context.CreateTempDirectory("schedules");
+ var db = await ChronosDatabase.OpenAsync(DatabaseOptions.Sqlite(Path.Combine(folder, "chronos.db")), context.Cancellation);
+ return new ScheduleFixture(context, settings ?? new AppSettings { Language = "en" }, db, folder);
+ }
+
+ /// Starts a scheduler on the host (a previous one is stopped first, as at the next start of the app).
+ public async Task StartAsync()
+ {
+ if (Scheduler is not null) await Scheduler.DisposeAsync();
+ Scheduler = new Scheduler(Db, Engine, new SchedulerOptions { Time = Clock, Tick = TimeSpan.FromHours(1) });
+ await Scheduler.StartAsync(Host, Context.Cancellation);
+ return Scheduler;
+ }
+
+ /// The view model of Jobs › Scheduled on this scheduler; deletes and resets are confirmed with .
+ public async Task ViewModelAsync(Func? confirm = null, List? toasts = null)
+ {
+ var scheduler = Scheduler ?? await StartAsync();
+ var vm = new SchedulesViewModel(() => scheduler, () => Db, confirm ?? (_ => true), (title, _, _) => toasts?.Add(title), _ => Task.CompletedTask);
+ await vm.AttachAsync(Task.FromResult(true));
+ return vm;
+ }
+
+ public async ValueTask DisposeAsync()
+ {
+ if (Scheduler is not null) await Scheduler.DisposeAsync();
+ await Engine.DisposeAsync();
+ await Db.DisposeAsync();
+ }
+}
diff --git a/tests/Chronos.App.Tests/Jobs/ScheduledTabTests.cs b/tests/Chronos.App.Tests/Jobs/ScheduledTabTests.cs
new file mode 100644
index 00000000..ef08d3e8
--- /dev/null
+++ b/tests/Chronos.App.Tests/Jobs/ScheduledTabTests.cs
@@ -0,0 +1,117 @@
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Media;
+using Chronos.App.Jobs;
+using Chronos.App.Sections;
+using Chronos.App.Shell;
+using Chronos.App.Tests.Windows;
+using Chronos.Core.Localization;
+using Chronos.Testing;
+
+namespace Chronos.App.Tests.Jobs;
+
+///
+/// Jobs › Scheduled on the capture sample (owner review 2, R10): the tab draws in both themes, every row and control is
+/// named and has a tooltip, system rows reset and the user's delete, a schedule's run opens in the Queue tab with its
+/// "Scheduled" pill, and the editor opens over the screen.
+///
+[WindowsOnly]
+[Serial]
+[Timeout(300_000)]
+public sealed class ScheduledTabTests
+{
+ [Test]
+ public Task TheScheduledTabListsTheSchedulesAndLeadsToTheirJobs() => ScreenHost.RunAsync(async () =>
+ {
+ await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
+ var shell = app.Shell;
+ await app.Sample.FillAsync();
+ await shell.Jobs.ReloadAsync();
+ var schedules = shell.Jobs.Schedules;
+ await schedules.Attached;
+ await schedules.ReloadAsync();
+ shell.Navigate(SectionKey.Jobs);
+ shell.Jobs.TabIndex = 1;
+ await app.ExpectAsync("jobs-scheduled");
+
+ Assert.SequenceEqual(["Archive scan", "Index backup", "Housekeeping", "Weekly integrity check", "Monthly orphans report"], schedules.Rows.Select(r => r.Name));
+ var items = app.FindAll().Where(i => i.DataContext is ScheduleRowViewModel && i.IsVisible).ToList();
+ Assert.Count(5, items);
+ foreach (var item in items)
+ {
+ var row = (ScheduleRowViewModel)item.DataContext;
+ Assert.Equal(row.AccessibleName, AutomationProperties.GetName(item));
+ var controls = Descendants(item).Where(b => b.IsVisible).ToList();
+ // The switch, Run now, Edit, and Reset or Delete.
+ Assert.Count(4, controls);
+ Assert.True(controls.All(c => c.ToolTip is not null && AutomationProperties.GetName(c).Contains(row.Name, StringComparison.Ordinal)),
+ $"every control of {row.Name} has a tooltip and names its row");
+ var last = Descendants