使用流程
使用流程
dnf install -y at # 或 apt install at
systemctl enable --now atd
echo '/opt/scripts/maintenance.sh >> /var/log/at-run.log 2>&1' | at 23:30
at now + 2 hours < /opt/scripts/check.sh
atq
atrm 3权限文件:/etc/at.allow 或 /etc/at.deny;两者都存在时 allow 优先,空的 allow 表示仅 root 可用。