# Usa modalità da config (hourly o daily)
python file_processor.py
# Processa una data specifica (ignora execution_mode)
python file_processor.py 15-03-2025
# Forza elaborazione
python file_processor.py --force
# Config alternativo
python file_processor.py --config altro_config.json
# Salta controllo giorno precedente (solo hourly)
python file_processor.py --no-previous-day-check
{
"execution_mode": "hourly",
"daily_execution_hour": 3,
"input": {
"host": "192.168.1.100",
"share": "SharedFolder",
"path": "input",
"username": "user",
"password": "pass",
"domain": ""
},
"output": {
"locale": "no",
"local_path": "./output",
"host": "192.168.1.200",
"share": "OutputFolder",
"path": "output",
"username": "user",
"password": "pass",
"domain": ""
},
"error_path": "./errors"
}
Execution mode:
"hourly" → Controlli multipli durante il giorno (ieri + oggi)"daily" → Una sola esecuzione al giorno (solo ieri, consolidamento finale)Daily execution hour: Ora configurata per modalità daily (default: 3)
Output locale: "locale": "yes" → scrive in local_path
Output remoto: "locale": "no" → scrive su PC remoto
Percorso errori: "error_path": "./errors" → directory per file di errore
.state_GGMMAAAA.json)Cron configurazione:
# Ogni ora
0 * * * * cd /path/to/script && python3 file_processor.py >> /var/log/file_processor.log 2>&1
Cron configurazione:
# Alle 03:00 ogni giorno (o all'ora configurata in daily_execution_hour)
0 3 * * * cd /path/to/script && python3 file_processor.py >> /var/log/file_processor.log 2>&1
GGMMAAAA.txt)01003HOURLY: Ogni esecuzione controlla PRIMA il file di ieri, poi quello di oggi DAILY: Processa SOLO il file di ieri (consolidamento finale alle 03:00)
errorGG.txt in error_path (tipo: input)errorGG.txt in error_path (tipo: output)Linux: sudo apt-get install smbclient
Windows: Solo Python 3.x