📜  将作业添加到 crontab - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:33.429000             🧑  作者: Mango

代码示例1
# To add cronjob
# For no output
echo "* * * * * command >> /dev/null 2>&1" | crontab -
# output to file
echo "* * * * * command >> cron.logs 2>&1" | crontab -
# view crons
crontab -l
# edit crons using editor
crontab -e
# view CRON system logs
grep CRON /var/log/syslog