Crontab在重启时永远存在。为什么永远不会开始?

时间:2019-07-09 10:56:08

标签: cron ubuntu-16.04 systemctl

好吧,当我将代码插入cron时。然后重新启动它。 id根本不会产生错误错误

root@ubuntu:~# systemctl status cron
● cron.service - Regular background program processing daemon
   Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-07-09 03:47:09 PDT; 3min 26s ago
     Docs: man:cron(8)
 Main PID: 620 (cron)
    Tasks: 1
   Memory: 2.6M
      CPU: 1.300s
   CGroup: /system.slice/cron.service
           └─620 /usr/sbin/cron -f

Jul 09 03:47:09 ubuntu CRON[676]: (root) CMD (/usr/local/bin/forever start /srv/daemon/src/index.js > /dev/null 2>&1)
Jul 09 03:47:09 ubuntu CRON[655]: pam_unix(cron:session): session closed for user root
Jul 09 03:47:09 ubuntu cron[620]: sendmail: fatal: open /etc/postfix/main.cf: No such file or directory
Jul 09 03:47:09 ubuntu postfix/sendmail[712]: fatal: open /etc/postfix/main.cf: No such file or directory
Jul 09 03:48:00 ubuntu CRON[1322]: pam_unix(cron:session): session opened for user root by (uid=0)
Jul 09 03:48:00 ubuntu CRON[1323]: (root) CMD (php /var/www/pterodactyl/artisan schedule:run >> /dev/null 2>&1)
Jul 09 03:49:01 ubuntu CRON[1342]: pam_unix(cron:session): session opened for user root by (uid=0)
Jul 09 03:49:01 ubuntu CRON[1343]: (root) CMD (php /var/www/pterodactyl/artisan schedule:run >> /dev/null 2>&1)
Jul 09 03:50:01 ubuntu CRON[1361]: pam_unix(cron:session): session opened for user root by (uid=0)
Jul 09 03:50:01 ubuntu CRON[1362]: (root) CMD (php /var/www/pterodactyl/artisan schedule:run >> /dev/null 2>&1)

仅sendmail之一。但这与Forever And Pterodactyl守护程序无关。

我尝试了multipble代码,我尝试了systemctl。没有任何作用

0 4   *   *   *    /sbin/shutdown -r +5
@reboot /usr/local/bin/forever start -c /usr/local/bin/node /srv/daemon/src/index.js

我想要的只是。该节点从我的机器启动时开始。

0 个答案:

没有答案