Cron 作业未在 Ubuntu 上触发

Cron job not getting triggered on Ubuntu

我正在尝试使用 cron 安排工作。

以下是我执行的步骤:

sudo vi /etc/crontab

添加了以下行: * * * * * root /bin/ls >> corn_example

仍然没有触发作业。

我怀疑这是因为您没有指定 'ls' 的文件夹或要在其中创建示例文件的文件夹位置。

我会尝试:

* * * * * root /bin/ls /tmp/ >> /tmp/corn_example