Warum funktionieren Prozentzeichen (%) in Crontab nicht? [Duplikat
Diese Frage hat hier bereits eine Antwort:
Wie ist% special in crontab? 1 AntwortIch schreibe Dateien in ein Protokoll, das von einem Bash-Skript mit cron ausgeführt wird. Der Aufruf von cron sieht so aus:
*/25 * * * * bash script.sh > "/var/log/$(date +%Y-%m-%d_%H:%M).log"
Aber wenn ich die Crontab überprüfe, zeichnet sie als @ a
*/25 * * * * bash script.sh > "/var/log/$(date +).log"
Und es schreibt niemals die Protokolldatei. Muss ich etwas ändern, damit cron das Datum schreibt?