19 lines
448 B
Bash
Executable File
19 lines
448 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Aktiviere virtuelle Umgebung
|
|
source /home/rxf/Projekte/citysensor/.venv/bin/activate
|
|
|
|
cd /home/rxf/Projekte/citysensor
|
|
|
|
# Protokollfunktion mit Zeitstempel
|
|
log() {
|
|
echo "$(date '+%Y-%m-%d %H:%M:%S') $1" >> logs/cron.log
|
|
}
|
|
|
|
log ">>> Starte Citysensor-Prüfung"
|
|
|
|
# Python-Skript ausführen und Ergebnis loggen
|
|
python main.py >> logs/cron.log 2>&1
|
|
|
|
log ">>> Citysensor-Püfung abgeschlossen"
|
|
log "------------------------------------" |