feat: Implementazione completa sistema schedulazione con intervalli personalizzati

- Aggiunto supporto schedulazione con intervalli flessibili (secondi/minuti/ore/giorni/settimane/mesi)
- Esteso modello ProfileSchedule con campi IntervalValue e IntervalUnit
- Ottimizzato ScheduledJobService per controlli ogni 30s con esecuzione parallela
- Implementata interfaccia UI completa con anteprima real-time in italiano
- Aggiunta migrazione database AddIntervalSchedulingFields
- Implementati metodi calcolo NextExecutionTime per intervalli
- Aggiunta gestione tracking anti-duplicati e cleanup automatico
- Creata documentazione completa (6 file, 2500+ righe)

Modifiche tecniche:
- ProfileSchedule.cs: Nuovi campi e metodi CalculateNextInterval/GetScheduleDescription
- ScheduledJobService.cs: Ridotto check interval a 30s, aggiunto parallel processing
- ProfileScheduleService.cs: Supporto calcolo intervalli in UpdateNextExecutionTimeAsync
- Scheduling.razor: Aggiunta sezione UI per configurazione intervalli
- Scheduling.razor.cs: Implementato GetIntervalPreview() e gestione stato campi
This commit is contained in:
2025-10-02 01:12:39 +02:00
parent b76a6760fb
commit d042863a56
71 changed files with 17860 additions and 144 deletions
@@ -0,0 +1,27 @@
using CredentialManager.Models;
namespace CredentialManager.Services;
/// <summary>
/// Servizio per la gestione delle schedulazioni dei profili
/// </summary>
public interface IProfileScheduleService
{
Task<List<ProfileSchedule>> GetAllSchedulesAsync();
Task<ProfileSchedule?> GetScheduleByIdAsync(int id);
Task<ProfileSchedule> CreateScheduleAsync(ProfileSchedule schedule);
Task<ProfileSchedule> UpdateScheduleAsync(ProfileSchedule schedule);
Task<bool> DeleteScheduleAsync(int id);
Task<List<ProfileSchedule>> GetActiveSchedulesAsync();
Task<List<ProfileSchedule>> GetPendingExecutionsAsync();
Task<bool> UpdateExecutionStatusAsync(int scheduleId, string status, string? message = null, int? recordCount = null);
Task UpdateNextExecutionTimeAsync(int scheduleId);
Task<List<DataCouplerProfile>> GetAvailableProfilesAsync();
// Metodi per lo storico delle esecuzioni
Task<ScheduleExecutionHistory> CreateExecutionHistoryAsync(ScheduleExecutionHistory history);
Task<ScheduleExecutionHistory> UpdateExecutionHistoryAsync(ScheduleExecutionHistory history);
Task<List<ScheduleExecutionHistory>> GetExecutionHistoryAsync(int scheduleId, int? limit = null);
Task<List<ScheduleExecutionHistory>> GetRecentExecutionsAsync(int limit = 50);
Task<ScheduleExecutionHistory?> GetExecutionByIdAsync(int executionId);
}