0
如下所示,我有一個centos7容器,並且我配置了一個cron作業。但它似乎並沒有執行。我錯過了什麼?crontab不能在centos7容器上執行
主機:centos的:在Mac運行7搬運工容器
[[email protected] /]# cat /etc/*-release
CentOS Linux release 7.2.1511 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
BUG_REPORT_URL="https://bugs.centos.org/
CentOS Linux release 7.2.1511 (Core)
CentOS Linux release 7.2.1511 (Core)
[[email protected] /]#
[[email protected] /]# date
Fri Sep 16 06:27:49 UTC 2016
[[email protected] /]# crontab -l
no crontab for root
[[email protected] /]# cat mycron
* * * * * echo "hello" >> /var/log/cron1.log 2>&1
[[email protected] /]# touch /var/log/cron1.log
[[email protected] /]# crontab -u root mycron
[[email protected] /]# crontab -l
* * * * * echo "hello" >> /var/log/cron1.log 2>&1
[[email protected] /]# date
Fri Sep 16 06:27:55 UTC 2016
[[email protected] /]# cat /var/log/cron1.log
[[email protected] /]# date
Fri Sep 16 06:32:03 UTC 2016
[[email protected] /]# cat /var/log/cron1.log
[[email protected] /]#