Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试设置一个 cron 作业,即每分钟回显“hi”。
当我这样做时,* * * * * echo "hi"我得到blado.kdb: command not found. 有什么想法可以解决这个问题吗?
* * * * * echo "hi"
blado.kdb: command not found
crontab -e
您的 Cron 任务现已设置
PS:echo "hi"会在空白处打印“hi”,如果你想看到一些结果,设置一个任务如* * * * * touch /tmp/foo,你会看到每分钟更新一次修改日期(ls -l /tmp/foo)
echo "hi"
* * * * * touch /tmp/foo
ls -l /tmp/foo