配置 cron 作业,以用户 harry 身份每天
14:23 分执行 /usr/bin/echo hello
1 2 3 4 5 6 7 8 9 10 11
[root@node1 ~]# systemctl is-active crond.service; systemctl is-enabled crond.service active enabled [root@node1 ~]# which logger /usr/bin/logger [root@node1 ~]# crontab -e -u natasha no crontab for natasha - using an empty one crontab: installing new crontab [root@node1 ~]# crontab -l -u natasha */2 * * * * /usr/bin/logger "EX200 in progress" [root@node1 ~]# grep EX200 /var/log/messages
1 2 3 4 5
[root@node1 ~]# crontab -e -u harry no crontab for harry - using an empty one crontab: installing new crontab [root@node1 ~]# crontab -l -u harry 23 14 * * * /usr/bin/echo hello