定时任务,自动更新证书和备份文件仅保留一周内的:
[root@iZj6c69digospl6f2d3s45Z bitwarden-backup]# crontab -l
21 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
0 0 * * * /opt/bitwarden-backup/bw-data-backup.sh >> /opt/bitwarden-backup/backup.log && find /home/appadmin/bitwarden-backup/ -type f -name "bw-data_backup_*" -mtime +7 -exec rm {} \;
编辑命令:
crontab -e
使之生效:
service cron restart